From c3eab0133be95226c7655ee478863e219ffb8daa Mon Sep 17 00:00:00 2001 From: Viyurz <128215328+Viyurz@users.noreply.github.com> Date: Wed, 6 Dec 2023 07:42:31 +0000 Subject: [PATCH] rootless nginx-www --- nginx-www/docker-compose.yaml | 3 ++- nginx-www/nginx.conf | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/nginx-www/docker-compose.yaml b/nginx-www/docker-compose.yaml index 150ce62..b0e425f 100644 --- a/nginx-www/docker-compose.yaml +++ b/nginx-www/docker-compose.yaml @@ -1,8 +1,9 @@ services: nginx-www: - image: nginx:latest + image: nginx:alpine restart: always container_name: nginx-www + user: '101:101' ports: - "[::1]:8082:80" volumes: diff --git a/nginx-www/nginx.conf b/nginx-www/nginx.conf index 9c7f7a2..417ff4e 100644 --- a/nginx-www/nginx.conf +++ b/nginx-www/nginx.conf @@ -1,3 +1,6 @@ +user nginx; +pid /tmp/nginx.pid; + worker_processes auto; worker_cpu_affinity auto; worker_rlimit_nofile 2048; @@ -22,6 +25,12 @@ http { include /etc/nginx/mime.types; default_type application/octet-stream; + 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; + server { listen 80 default_server; listen [::]:80 default_server;