fix(docker): use plain \${PORT} in nginx template — envsubst can't expand bash defaults
`listen ${PORT:-8080};` in docker/nginx.conf used bash-style default
expansion. envsubst (GNU gettext) does not implement `:-default`; it
either leaves the token literal or substitutes only `${PORT}` and
keeps `:-8080`, producing `listen 8080:-8080;`. Either way nginx
errors with "invalid port in '${PORT:-8080}' of the listen
directive" and the container restart-loops.
entrypoint.sh already exports PORT with a bash default
(`PORT="${PORT:-8080}"`) before calling envsubst, so the template
only needs `${PORT}`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
7d214ed586
commit
0fcc526c46
1 file changed
+1
-1
+1
-1
@@ -1,5 +1,5 @@
|
||||
server {
|
||||
listen ${PORT:-8080};
|
||||
listen ${PORT};
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
Reference in new issue
Block a user