All checks were successful
Build and Test - Staging / determine_version (pull_request) Successful in 35s
Build and Test - Staging / build_and_push (pull_request) Successful in 2m26s
Build and Test - Staging / test (pull_request) Successful in 3s
Build and Test - Staging / deploy_staging (pull_request) Successful in 6s
14 lines
354 B
Bash
Executable File
14 lines
354 B
Bash
Executable File
#!/usr/bin/env sh
|
|
set -e
|
|
|
|
# Generate a unique token per container launch
|
|
TOKEN="$(cat /proc/sys/kernel/random/uuid)" # or: TOKEN="$(date +%s%N)"
|
|
|
|
# Write it into a file NGINX will include
|
|
cat >/etc/nginx/conf.d/_release_token.conf <<EOF
|
|
# auto-generated at container start
|
|
set \$release_token "$TOKEN";
|
|
EOF
|
|
|
|
# Then exec nginx
|
|
exec nginx -g 'daemon off;' |