File tree Expand file tree Collapse file tree 4 files changed +477
-2
lines changed Expand file tree Collapse file tree 4 files changed +477
-2
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,14 @@ networks:
55
66services :
77 site :
8- image : nginx:stable-alpine
8+ build :
9+ context : .
10+ dockerfile : nginx.dockerfile
911 container_name : nginx
1012 ports :
1113 - " 8080:80"
1214 volumes :
1315 - ./src:/var/www/html:delegated
14- - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
1516 depends_on :
1617 - php
1718 - mysql
Original file line number Diff line number Diff line change 1+ FROM nginx:stable-alpine
2+
3+ RUN addgroup -S 1000 && adduser -S 1000 -G 1000
4+
5+ ADD ./nginx/nginx.conf /etc/nginx/nginx.conf
6+ ADD ./nginx/default.conf /etc/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change 1+ user 1000 ;
2+ worker_processes auto;
3+
4+ error_log /var/log/nginx/error.log warn;
5+ pid /var/run/nginx.pid ;
6+
7+ events {
8+ worker_connections 1024 ;
9+ }
10+
11+ http {
12+ include /etc/nginx/mime.types ;
13+ default_type application/octet-stream ;
14+
15+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
16+ '$status $body_bytes_sent "$http_referer" '
17+ '"$http_user_agent" "$http_x_forwarded_for"' ;
18+
19+ access_log /var/log/nginx/access.log main;
20+
21+ sendfile on;
22+ #tcp_nopush on;
23+
24+ keepalive_timeout 65 ;
25+
26+ #gzip on;
27+
28+ include /etc/nginx/conf.d/*.conf;
29+ }
You can’t perform that action at this time.
0 commit comments