Skip to content

Commit

Permalink
fix(entrypoint.sh): fix sed for NGINX_HTTP_PORT
Browse files Browse the repository at this point in the history
Added extra whitespace to prevent pattern `listen 8080` from being recognized as `listen 80`
  • Loading branch information
nikAizuddin committed Feb 12, 2022
1 parent 75c27a6 commit 1a26a3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ INDEX_HTML_FILE="/usr/share/nginx/html/index.html";

# Change default NGINX listen port if NGINX_HTTP_PORT env is set
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
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
Expand Down

0 comments on commit 1a26a3d

Please sign in to comment.