Persist env vars for app runtime

This commit is contained in:
Codex
2025-11-12 09:37:15 -06:00
parent 6720e936c2
commit a55b4bf1cb
3 changed files with 26 additions and 2 deletions

View File

@@ -3,6 +3,14 @@ set -euo pipefail
APP_DIR=${APP_BUILD_DIR:-/app/code/affine}
cd "$APP_DIR"
ENV_EXPORT_FILE=${ENV_EXPORT_FILE:-/run/affine/runtime.env}
if [ -f "$ENV_EXPORT_FILE" ]; then
set -a
# shellcheck disable=SC1090
source "$ENV_EXPORT_FILE"
set +a
fi
log() {
printf '[%s] %s\n' "$(date --iso-8601=seconds)" "$*"