12 lines
462 B
Bash
12 lines
462 B
Bash
#!/bin/sh
|
|||
|
|
set -e
|
||
|
|
|
||
|
|
# Render /etc/nginx/templates/*.template into /etc/nginx/conf.d/ using the
|
||
|
|
# current environment (BACKEND_HOST, BACKEND_PORT, ...). The stock nginx image
|
||
|
|
# does this automatically, but we start nginx via supervisord, so do it here.
|
||
|
|
mkdir -p /etc/nginx/conf.d
|
||
|
|
envsubst '${BACKEND_HOST} ${BACKEND_PORT}' \
|
||
|
|
< /etc/nginx/templates/default.conf.template \
|
||
|
|
> /etc/nginx/conf.d/default.conf
|
||
|
|
|
||
|
|
exec /usr/bin/supervisord -c /etc/supervisord.conf
|