Skip to content
Snippets Groups Projects
Commit 526bd3b3 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Try to use classical nginx as non root

parent bfa0dc8f
No related branches found
No related tags found
1 merge request!134Resolve "Table with all PDB files, to make them available to download"
Pipeline #118312 passed with stages
in 7 minutes and 54 seconds
This commit is part of merge request !134. Comments created here will be created in the context of that merge request.
...@@ -74,10 +74,10 @@ COPY . /usr/src/app ...@@ -74,10 +74,10 @@ COPY . /usr/src/app
RUN npm run generate RUN npm run generate
### STAGE: NGINX ### ### STAGE: NGINX ###
FROM nginxinc/nginx-unprivileged:1.25-bookworm FROM nginx:1.25-bookworm
RUN apt update -y && apt install rsync -y
# RUN rm -rf /usr/share/nginx/html/* # RUN rm -rf /usr/share/nginx/html/*
# COPY nginx.conf /etc/nginx/conf.d/default.conf RUN apt update -y && apt install -y
COPY --from=generate /usr/src/app/.output/public /etc/nginx/html COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=generate /usr/src/app/.output/public /usr/share/nginx/html
USER nginx
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]
\ No newline at end of file
server_tokens off; user nginx;
server { worker_processes auto;
listen 8080;
server_name localhost; error_log /var/log/nginx/error.log notice;
location /wiki { pid /tmp/nginx.pid;
alias /etc/nginx/html/;
index index.html index.htm;
try_files $uri $uri/ $uri/index.html /index.html; events {
worker_connections 1024;
} }
error_page 500 502 503 504 /50x.html;
location = /50x.html {
alias /etc/nginx/html/; http {
} include /etc/nginx/mime.types;
default_type application/octet-stream;
}
\ No newline at end of file log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
client_body_temp_path /tmp/client_temp;
proxy_temp_path /tmp/proxy_temp_path;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment