File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM nginx:latest
1+ FROM nginx:alpine
22
33MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
44
55ADD nginx.conf /etc/nginx/
6- ADD laravel.conf /etc/nginx/sites-available/
6+ ADD laravel.conf /etc/nginx/conf.d/laravel.conf
77
8- ARG PHP_UPSTREAM
8+ ARG PHP_UPSTREAM=php-fpm
99
10- RUN echo "upstream php-upstream { server ${PHP_UPSTREAM}:9000; }" > /etc/nginx/conf.d/upstream.conf
11-
12- RUN usermod -u 1000 www-data
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 \
15+ && echo "upstream php-upstream { server ${PHP_UPSTREAM}:9000; }" > /etc/nginx/conf.d/upstream.conf
1316
1417CMD ["nginx" ]
1518
Original file line number Diff line number Diff line change 11user www-data;
22worker_processes 4;
33pid /run/nginx.pid ;
4+ daemon off;
45
56events {
67 worker_connections 2048 ;
@@ -18,13 +19,10 @@ 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 /var/log/nginx/access.log ;
23+ error_log /var/log/nginx/error.log ;
2324 gzip on;
2425 gzip_disable "msie6" ;
2526 include /etc/nginx/conf.d/*.conf;
26- include /etc/nginx/sites-available/*;
2727 open_file_cache max=100 ;
2828}
29-
30- daemon off;
You can’t perform that action at this time.
0 commit comments