14 lines
316 B
Bash
Executable File
14 lines
316 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
: "${BACKEND_UPSTREAM:?BACKEND_UPSTREAM is required (example: http://analytical-panel-backend:8000)}"
|
|
|
|
BACKEND_UPSTREAM="${BACKEND_UPSTREAM%/}"
|
|
export BACKEND_UPSTREAM
|
|
|
|
envsubst '${BACKEND_UPSTREAM}' \
|
|
< /etc/nginx/templates/default.conf.template \
|
|
> /etc/nginx/conf.d/default.conf
|
|
|
|
exec "$@"
|