Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default configuration in Dockerfile using environment variables #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ FROM alpine:latest
WORKDIR /root
EXPOSE 80
COPY --from=0 /go/src/github.com/buchgr/bazel-remote/bazel-remote .
ENTRYPOINT ["./bazel-remote", "--port=80", "--dir=/data"]
ENV BAZEL_REMOTE_DIR=/data \
BAZEL_REMOTE_PORT=80
ENTRYPOINT ["./bazel-remote"]
26 changes: 8 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,14 @@ commodity hardware and AWS servers. Outgoing bandwidth can exceed 15 Gbit/s on t

```
Usage of ./bazel-remote:
-dir string
Directory path where to store the cache contents. This flag is required.
-host string
Address to listen on. Listens on all network interfaces by default.
-htpasswd_file string
Path to a .htpasswd file. This flag is optional. Please read
https://httpd.apache.org/docs/2.4/programs/htpasswd.html.
-max_size int
The maximum size of the remote cache in GiB. This flag is required. (default -1)
-port int
The port the HTTP server listens on (default 8080)
-tls_cert_file string
Path to a PEM encoded certificate file. Required if tls_enabled is set to true.
-tls_enabled
Bool specifying whether or not to start the server with tls. If true, server_cert and server_key flags
are requred.
-tls_key_file string
Path to a PEM encoded key file. Required if tls_enabled is set to true.
--host value Address to listen on. Listens on all network interfaces by default. [$BAZEL_REMOTE_HOST]
--port value The port the HTTP server listens on. (default: 8080) [$BAZEL_REMOTE_PORT]
--dir value Directory path where to store the cache contents. This flag is required. [$BAZEL_REMOTE_DIR]
--max_size value The maximum size of the remote cache in GiB. This flag is required. (default: -1) [$BAZEL_REMOTE_MAX_SIZE]
--htpasswd_file value Path to a .htpasswd file. This flag is optional. Please read https://httpd.apache.org/docs/2.4/programs/htpasswd.html. [$BAZEL_REMOTE_HTPASSWD_FILE]
--tls_enabled Bool specifying whether or not to start the server with tls. If true, server_cert and server_key flags are required. [$BAZEL_REMOTE_TLS_ENABLED]
--tls_cert_file value Path to a pem encoded certificate file. Required if tls_enabled is set to true. [$BAZEL_REMOTE_TLS_CERT_FILE]
--tls_key_file value Path to a pem encoded key file. Required if tls_enabled is set to true. [$BAZEL_REMOTE_TLS_KEY_FILE]
```

## Docker
Expand Down