https://pantsbuild.org/ logo
#general
Title
# general
c

cold-vr-15232

10/18/2022, 3:10 PM
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

high-yak-85899

10/18/2022, 4:29 PM
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

cold-vr-15232

10/18/2022, 6:50 PM
Thanks a lot! I will try that and see how it works.
h

high-yak-85899

10/18/2022, 6:53 PM
All that was needed in
pants.toml
was an entry like
[GLOBAL].remote_store_address = "grpc://<wherever you are hosting it>:9099"
c

cold-vr-15232

10/18/2022, 8:27 PM
Looks great thanks again @high-yak-85899