File tree 4 files changed +477
-2
lines changed
4 files changed +477
-2
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,14 @@ networks:
5
5
6
6
services :
7
7
site :
8
- image : nginx:stable-alpine
8
+ build :
9
+ context : .
10
+ dockerfile : nginx.dockerfile
9
11
container_name : nginx
10
12
ports :
11
13
- " 8080:80"
12
14
volumes :
13
15
- ./src:/var/www/html:delegated
14
- - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
15
16
depends_on :
16
17
- php
17
18
- 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