90f1cf8bdf
Format / gofmt (push) Successful in 5s
CI / Build (push) Successful in 12s
CI / Go Tests (push) Successful in 22s
Release Artifacts / Validate release tag (push) Successful in 1s
Release Artifacts / Build and release executables (push) Successful in 33s
Release Artifacts / Build and release Docker image (push) Successful in 3m10s
Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
860 B
Bash
27 lines
860 B
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
# This script forces certain SCRATCHBOX_* vars for Docker.
|
|
# The full list of supported env vars (single source of truth) is in
|
|
# internal/config/config.go:envSuffixes . Update that list + docs when changing env support.
|
|
|
|
# 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
|
|
|
|
# Entrypoint is fixed for Docker deployments; custom args are not supported.
|
|
if [ "$#" -ne 0 ]; then
|
|
echo "custom entrypoint arguments are not supported; configure via SCRATCHBOX_* env vars" >&2
|
|
exit 2
|
|
fi
|
|
|
|
exec scratchbox server --env
|