Hi! I might need to setup a remote cache, and unfo...
# general
c
Hi! I might need to setup a remote cache, and unfortunately it has to be self-hosted. I see the docs are recommending three such applications, but I have no experience with this and don't know which to choose. I can't fins comparisons between them, so I would like to ask if anyone could recommend one or another. I suppose the requirements are "it should work" and "it should be easy to setup" :-)
😈 1
h
You can really use anything that uses the caching API available
We use
bazel_remote_cache
because we already had it set up and it just worked. Here's a simple docker compose to get you up to speed
Copy code
version: '3'

services:
  bazel_remote_cache:
    image: buchgr/bazel-remote-cache:v2.1.1
    restart: unless-stopped
    volumes:
      - /var/bazel_cache:/data
    ports:
      - 9090:9090
      - 9099:9099
    # /var/bazel_cache should be owned by uid 1234 with 755 permissions
    user: "1234"
    # max_size is the size of the remote cache in GB
    # A cache may choose to simply modify this file to change its size;
    # 256 is the default and not the standard
    command: --port=9090 --grpc_port=9099 --max_size=256
c
Thanks a lot! I will try that and see how it works.
h
All that was needed in
pants.toml
was an entry like
[GLOBAL].remote_store_address = "grpc://<wherever you are hosting it>:9099"
c
Looks great thanks again @high-yak-85899