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
......@@ -74,10 +74,10 @@ COPY . /usr/src/app
RUN npm run generate
### STAGE: NGINX ###
FROM nginxinc/nginx-unprivileged:1.25-bookworm
RUN apt update -y && apt install rsync -y
FROM nginx:1.25-bookworm
# RUN rm -rf /usr/share/nginx/html/*
# COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=generate /usr/src/app/.output/public /etc/nginx/html
RUN apt update -y && apt install -y
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;"]
\ No newline at end of file
server_tokens off;
server {
listen 8080;
server_name localhost;
location /wiki {
alias /etc/nginx/html/;
index index.html index.htm;
try_files $uri $uri/ $uri/index.html /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
alias /etc/nginx/html/;
}
}
\ No newline at end of file
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /tmp/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
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% 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