feat: JSON access log in the platform logging contract
All checks were successful
/ checks (push) Successful in 38s
/ deploy (push) Successful in 4s

This commit is contained in:
nholtware 2026-11-05 10:54:12 -06:00
parent fc7ebd5798
commit 444044b99a
5 changed files with 46 additions and 1 deletions

View file

@ -23,4 +23,12 @@ for name in $VARS; do
done
printf 'window.__APP_CONFIG__ = {%s};\n' "$body" > "$OUT"
echo "10-config.sh: wrote $OUT"
# nginx variables for the JSON access log (nginx/default.conf). Restricted
# charset: these land inside nginx string literals.
safe() { printf '%s' "$1" | tr -cd 'A-Za-z0-9._-'; }
cat > /etc/nginx/conf.d/service-vars.conf <<NGINX
map \$host \$app_name { default "$(safe "$APP_NAME")"; }
map \$host \$git_sha { default "$(safe "${GIT_SHA:-dev}")"; }
NGINX
echo "10-config.sh: wrote $OUT and service-vars.conf"