generated from nholtware/service-template-react
feat: JSON access log in the platform logging contract
This commit is contained in:
parent
fc7ebd5798
commit
444044b99a
5 changed files with 46 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue