fix: docker nginx entrypoint

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2217>
This commit is contained in:
jo 2022-11-26 14:29:57 +01:00 committed by JuniorJPDJ
parent 6455e21cf2
commit f60ba2d9be
2 changed files with 5 additions and 4 deletions

View File

@ -0,0 +1 @@
Fix docker nginx entrypoint

View File

@ -2,10 +2,10 @@
set -eux
envsubst "$(env | awk -F = '{printf \" $$%s\", $$1}')" \
< /etc/nginx/nginx.conf.template \
> /etc/nginx/nginx.conf
TEMPLATE_PATH="/etc/nginx/nginx.conf.template"
CONFIG_PATH="/etc/nginx/nginx.conf"
cat /etc/nginx/nginx.conf
ALLOWED_VARS="$(env | cut -d '=' -f 1 | xargs printf "\${%s} ")"
envsubst "$ALLOWED_VARS" < "$TEMPLATE_PATH" | tee "$CONFIG_PATH"
nginx-debug -g 'daemon off;'