nginx: listen on PORT, default 8080; server_tokens off (closes #26)
check / check (push) Successful in 15s
check / check (push) Successful in 15s
nginx.conf is now a template the nginx image renders into conf.d at container start. bin/entrypoint.sh sets PORT to 8080 when unset or empty, and stops with an error before starting anything when PORT is not digits only: nginx would take a value such as localhost or unix:/tmp/x.sock as an address and start anyway. NGINX_ENVSUBST_FILTER limits the rendering to PORT, so $uri, $host and every other nginx variable pass through unchanged. server_tokens off drops the version from the Server header and error pages. script/frontend-viewport-test renders the template the same way. EXPOSE still documents 8080; the backend stays on 127.0.0.1:8081. Model: opus-5-5
This commit was merged in pull request #65.
This commit is contained in:
+7
-1
@@ -1,7 +1,13 @@
|
||||
# A template: the nginx image renders it into conf.d at container start,
|
||||
# filling in PORT and nothing else. bin/entrypoint.sh sets PORT and that
|
||||
# limit.
|
||||
server {
|
||||
listen 8080;
|
||||
listen ${PORT};
|
||||
server_name _;
|
||||
|
||||
# Keep the nginx version out of the Server header and error pages.
|
||||
server_tokens off;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user