Skip to content
Snippets Groups Projects
Commit f2e8b790 authored by Etienne LOUPIAS's avatar Etienne LOUPIAS
Browse files

get nginx.conf default from official nginx-unprivileged:1.25 image

parent e26a89ee
No related branches found
No related tags found
1 merge request!991Store nginx logs
Pipeline #124678 passed
...@@ -27,6 +27,8 @@ RUN npm run build:prod ...@@ -27,6 +27,8 @@ RUN npm run build:prod
# Stage 1, based on Nginx, to have only the compiled app # Stage 1, based on Nginx, to have only the compiled app
FROM ${DEPENDENCY_PROXY}nginxinc/nginx-unprivileged:1.25 FROM ${DEPENDENCY_PROXY}nginxinc/nginx-unprivileged:1.25
COPY nginx/nginx.conf /etc/nginx/nginx.conf
# Copy nginx modified conf with template (cf. "Using environment variables in nginx configuration" in https://hub.docker.com/_/nginx ) # Copy nginx modified conf with template (cf. "Using environment variables in nginx configuration" in https://hub.docker.com/_/nginx )
COPY nginx/templates/default.conf.template /etc/nginx/templates/default.conf.template COPY nginx/templates/default.conf.template /etc/nginx/templates/default.conf.template
......
worker_processes 1; worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid; error_log /var/log/nginx/error.log notice;
pid /tmp/nginx.pid;
events { events {
worker_connections 1024; worker_connections 1024;
} }
http { http {
proxy_temp_path /tmp/proxy_temp;
client_body_temp_path /tmp/client_temp;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;
...@@ -15,20 +24,20 @@ http { ...@@ -15,20 +24,20 @@ http {
'"$http_user_agent" "$http_x_forwarded_for"' '"$http_user_agent" "$http_x_forwarded_for"'
'"$upstream_uri"'; '"$upstream_uri"';
# Default log to stdout # Default log which is redirected to stdout
access_log /var/log/nginx/access.log main; access_log /var/log/nginx/access.log main;
# Also write to file to persist logs # Also write to file to persist logs
access_log /var/log/nginx/persist/access.$time_local.log main; access_log /var/log/nginx/persist/access.$time_local.log main;
sendfile on; sendfile on;
#tcp_nopush on;
keepalive_timeout 65; keepalive_timeout 65;
gzip on; #gzip on;
include /etc/nginx/conf.d/*.conf; include /etc/nginx/conf.d/*.conf;
# Max Body Size # Max Body Size
client_max_body_size 10M; client_max_body_size 10M;
}
} \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment