Skip to content

Commit

Permalink
Explicitly set the variables we want to replace with envsubst
Browse files Browse the repository at this point in the history
  • Loading branch information
fsouza committed Jun 13, 2018
1 parent 5d8cd0c commit c692c92
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions configure_nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c692c92

Please sign in to comment.