Skip to content

Commit e6cf30e

Browse files
committed
re-added www-data user for nginx. log to stdout.
1 parent ed8e241 commit e6cf30e

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

nginx/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
55
ADD nginx.conf /etc/nginx/
66
ADD laravel.conf /etc/nginx/conf.d/laravel.conf
77

8-
ARG PHP_UPSTREAM
8+
ARG PHP_UPSTREAM=php-fpm
99

10-
RUN rm /etc/nginx/conf.d/default.conf \
10+
RUN apk update \
11+
&& apk upgrade \
12+
&& apk add --no-cache bash \
13+
&& adduser -D -H -u 1000 -s /bin/bash www-data \
14+
&& rm /etc/nginx/conf.d/default.conf \
1115
&& echo "upstream php-upstream { server ${PHP_UPSTREAM}:9000; }" > /etc/nginx/conf.d/upstream.conf
1216

1317
CMD ["nginx"]

nginx/nginx.conf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
user www-data;
12
worker_processes 4;
23
pid /run/nginx.pid;
34
daemon off;
@@ -18,8 +19,8 @@ http {
1819
client_max_body_size 20M;
1920
include /etc/nginx/mime.types;
2021
default_type application/octet-stream;
21-
access_log on;
22-
error_log on;
22+
access_log /dev/stdout;
23+
error_log /dev/stderr;
2324
gzip on;
2425
gzip_disable "msie6";
2526
include /etc/nginx/conf.d/*.conf;

0 commit comments

Comments
 (0)