Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
Resin
Client
Commits
a82c4b06
Commit
a82c4b06
authored
2 days ago
by
Etienne LOUPIAS
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
06d556ff
No related branches found
No related tags found
1 merge request
!991
Store nginx logs
Pipeline
#124680
passed with warnings
2 days ago
Stage: build
Stage: deploy
Stage: quality
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+2
-0
2 additions, 0 deletions
Dockerfile
nginx/nginx.conf
+1
-1
1 addition, 1 deletion
nginx/nginx.conf
with
3 additions
and
1 deletion
Dockerfile
+
2
−
0
View file @
a82c4b06
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
nginx/nginx.conf
+
1
−
1
View file @
a82c4b06
...
...
@@ -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;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment