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

fix

parent 06d556ff
No related branches found
No related tags found
1 merge request!991Store nginx logs
Pipeline #124680 passed with warnings
......@@ -27,7 +27,9 @@ RUN npm run build:prod
# Stage 1, based on Nginx, to have only the compiled app
FROM ${DEPENDENCY_PROXY}nginxinc/nginx-unprivileged:1.25
# Copy custom conf to write logs into file to persist them
COPY nginx/nginx.conf /etc/nginx/nginx.conf
RUN mkdir -p /var/log/nginx/persist
# 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
......
......@@ -26,7 +26,7 @@ http {
# Default log which is redirected to stdout
access_log /var/log/nginx/access.log main;
# 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.$year-$month-$day.log main;
sendfile on;
#tcp_nopush on;
......
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