Skip to content

Commit

Permalink
fix(entrypoint.sh): fix logic for sed NGINX listen port
Browse files Browse the repository at this point in the history
  • Loading branch information
nikAizuddin committed Feb 12, 2022
1 parent 6ce2827 commit 75c27a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ 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
if [ ! -z "${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
Expand Down

0 comments on commit 75c27a6

Please sign in to comment.