docker: change user to www-data

This commit is contained in:
Zankaria 2024-03-31 15:49:09 +02:00 committed by Zankaria
parent 726de817b1
commit 5bf2634bf6
5 changed files with 20 additions and 21 deletions

View file

@ -1,11 +1,10 @@
FROM nginx:1.25.3-alpine
COPY . /code
RUN addgroup --system leftypol \
&& adduser --system leftypol \
&& adduser leftypol leftypol \
&& /code/docker/common-setup.sh
RUN adduser --system www-data \
&& adduser www-data www-data \
&& /code/docker/common-setup.sh
CMD ["nginx", "-g", "daemon off;"]
EXPOSE 80 443
CMD [ "nginx", "-g", "daemon off;" ]
EXPOSE 80

View file

@ -1,15 +1,17 @@
# This and proxy.conf are based on
# https://github.com/dead-guru/devichan/blob/master/nginx/nginx.conf
user leftypol;
user www-data;
worker_processes auto;
# daemon off;
# error_log /var/log/nginx/error.log warn;
error_log /dev/stdout warn;
pid /var/run/nginx.pid;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;