diff --git a/configure_nginx.sh b/configure_nginx.sh index df2cfc1..d2929a6 100755 --- a/configure_nginx.sh +++ b/configure_nginx.sh @@ -5,10 +5,9 @@ export TARGET_HOST=${TARGET_HOST:-proxyapp} export CLIENT_MAX_BODY_SIZE=${CLIENT_MAX_BODY_SIZE:-20M} export SSL_PORT=${SSL_PORT:-443} -# Hack to avoid breaking nginx.conf -export host='$host' remote_addr='$remote_addr' proxy_add_x_forwarded_for='$proxy_add_x_forwarded_for' scheme='$scheme' remote_addr='$remote_addr' +REPLACEABLE='$TARGET_PORT:$TARGET_HOST:$CLIENT_MAX_BODY_SIZE:$SSL_PORT' -envsubst < /nginx.conf.template > /etc/nginx/nginx.conf +envsubst $REPLACEABLE < /nginx.conf.template > /etc/nginx/nginx.conf /add_self_signed_certs.sh