Add example environment configuration and Docker Compose setup
CI / Go Tests (push) Failing after 9s
CI / Build (push) Successful in 9s
Format / gofmt (push) Successful in 7s
Release Artifacts / Validate release tag (push) Successful in 1s
Release Artifacts / Build and release executables (push) Failing after 8s
Release Artifacts / Build and release Docker image (push) Has been skipped

- Introduced a new `.env.example` file to provide a template for environment variables used by the Scratchbox server.
- Added a `docker-compose.example.yml` file to facilitate easy deployment of the Scratchbox service with Docker.
- Updated `docker-entrypoint.sh` to enforce environment variable settings for server configuration.
- Removed the generation of a config key file from the workflow, simplifying the configuration process.
- Adjusted the README.md to reflect changes in configuration management and usage instructions.
This commit is contained in:
2026-06-01 04:36:53 -05:00
parent f74e028227
commit bc9077660b
10 changed files with 672 additions and 112 deletions
+16 -4
View File
@@ -1,12 +1,24 @@
#!/bin/sh
set -eu
# Default to running the server with mounted config.
# Container-enforced data directory.
SCRATCHBOX_STORAGE_DATA_DIR=/data
export SCRATCHBOX_STORAGE_DATA_DIR
# Container-enforced listen address/port.
SCRATCHBOX_SERVER_LISTEN_ADDR=:8080
export SCRATCHBOX_SERVER_LISTEN_ADDR
# Container-enforced access log behavior: stdout only (no file sink).
SCRATCHBOX_SERVER_ACCESS_LOG_FILE_PATH=
export SCRATCHBOX_SERVER_ACCESS_LOG_FILE_PATH
# Default to running the server from SCRATCHBOX_* env vars.
if [ "$#" -eq 0 ]; then
set -- server --config /config/config.yaml
set -- server --env
elif [ "${1#-}" != "$1" ]; then
# Allow passing server flags directly, e.g. `docker run ... --config ...`.
set -- server "$@"
# Allow passing server flags directly, e.g. `docker run ... --env`.
set -- server --env "$@"
fi
exec scratchbox "$@"