Skip to content

Commit

Permalink
Add Docker compose example and description to README
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasScharpf authored and mostynb committed Feb 26, 2024
1 parent ee1e146 commit 58ead82
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,10 @@ If you want the docker container to run in the background pass the `-d` flag rig
You can adjust the maximum cache size by appending `--max_size N`, where N is
the maximum size in Gibibytes.

### Docker Compose notes

See [examples/docker-compose.yml](examples/docker-compose.yml) for an example configuration (modify the `--max_size` flag in there to suit your needs).

### Kubernetes notes

* See [examples/kubernetes.yml](examples/kubernetes.yml) for an example
Expand All @@ -648,7 +652,6 @@ the maximum size in Gibibytes.
alb.ingress.kubernetes.io/target-type: ip
```


### Build your own

The command below will build a docker image from source and install it into your local docker registry.
Expand Down
20 changes: 20 additions & 0 deletions examples/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3.6'

services:
bazel-cache:
container_name: bazel-remote-cache
image: buchgr/bazel-remote-cache:latest
restart: always
ports:
- 9090:8080
- 9092:9092
command: --max_size=1000
volumes:
- /path/to/cache/dir:/data
environment:
BAZEL_REMOTE_GRPC_PORT: 9092
# setting data dir and the max_size has no effect here as they are predefined by command line args
# use the "command" to overwrite it or build your own image with different default parameters
# see https://stackoverflow.com/q/64341356/13543363
# BAZEL_REMOTE_DIR: /data
# BAZEL_REMOTE_MAX_SIZE: 1000

0 comments on commit 58ead82

Please sign in to comment.