diff --git a/.env.example b/.env.example index 0033bc2..d8b2ff7 100644 --- a/.env.example +++ b/.env.example @@ -3,4 +3,5 @@ VUE_APP_CSP_HOSTS="*.saferwall.com saferwall.com" VUE_APP_BASE_URI="https://saferwall.com/" VUE_APP_API_BASE_URL="https://api.saferwall.com/v1/" -VUE_APP_AVATAR_BASE_URL="https://avatar.saferwall.com/" \ No newline at end of file +VUE_APP_AVATAR_BASE_URL="https://avatar.saferwall.com/" +NGINX_HTTP_PORT="80" \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 7f97508..57dc81c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -23,6 +23,11 @@ done NGINX_CONF_FILE="/etc/nginx/conf.d/default.conf" INDEX_HTML_FILE="/usr/share/nginx/html/index.html"; +# Change default NGINX listen port if NGINX_HTTP_PORT env is set +if [[ -v "${NGINX_HTTP_PORT}" ]]; then + sed -i "s~listen 80~listen $NGINX_HTTP_PORT~g" $NGINX_CONF_FILE + sed -i "s~listen \[\:\:\]\:80~listen [::]:$NGINX_HTTP_PORT~g" $NGINX_CONF_FILE +fi # api url csp sed -i "s~connect-src~connect-src $VUE_APP_BASE_URI~g" $NGINX_CONF_FILE