bc9077660b
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.
25 lines
659 B
Bash
25 lines
659 B
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
# 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 --env
|
|
elif [ "${1#-}" != "$1" ]; then
|
|
# Allow passing server flags directly, e.g. `docker run ... --env`.
|
|
set -- server --env "$@"
|
|
fi
|
|
|
|
exec scratchbox "$@"
|