bazel-cache
bazel-cache copied to clipboard
Simplify deployment on Google Cloud Run / Add simple gRPC health check
- Resolves https://github.com/znly/bazel-cache/issues/5, at least, made it simpler to configure.
- Have been running in production for a few weeks with no issues so far.
- Removes
.git
from the docker image for an even smaller image. - Uses docker buildx to simplify cross-compilation of the image.
- Defaults to
serve
command. - Combines
--port
and--port_from_env
into a single Viper injected / defaulted env var. - Happy to clean this up, I had staged a gitignored
deploy.sh
file.
For this image, I recommend 8GiB memory, 4 vCPU, 10 requests per container, and second generation execution environment. For autoscaling, maybe 6-8 minimum and maximum depends on how bursty your traffic is. Monitor the cloud run metrics for the service for a few days.