File tree 5 files changed +16
-12
lines changed
5 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 6
6
context : .
7
7
docker :
8
8
dockerfile : ./docker_config/services/Dockerfile
9
+ buildArgs :
10
+ DNS_RESOLVER : 127.0.0.1
9
11
- image : forcad-initializer
10
12
context : .
11
13
docker :
Original file line number Diff line number Diff line change @@ -94,18 +94,15 @@ services:
94
94
- SERVICE=tcp_receiver
95
95
96
96
nginx :
97
- image : nginx:1.17.9-alpine
97
+ build :
98
+ context : .
99
+ dockerfile : ./docker_config/nginx/Dockerfile
100
+ args :
101
+ DNS_RESOLVER : 127.0.0.11
98
102
ports :
99
103
- " 8080:80"
100
104
- " 80:80"
101
105
- " 31337:31337"
102
- volumes :
103
- - ./docker_config/nginx/nginx.conf:/etc/nginx/nginx.conf
104
- - ./docker_config/nginx/http.conf:/etc/nginx/http.conf
105
- - ./docker_config/nginx/tcp.conf:/etc/nginx/tcp.conf
106
- - ./docker_config/nginx/proxy_params:/etc/nginx/proxy_params
107
- - ./docker_config/nginx/proxy_params_ws:/etc/nginx/proxy_params_ws
108
- - ./front/dist:/var/www/front:delegated
109
106
restart : on-failure
110
107
depends_on :
111
108
- flower
Original file line number Diff line number Diff line change 1
1
FROM nginx:1.19.1-alpine
2
2
3
3
COPY docker_config/nginx/nginx.conf /etc/nginx/nginx.conf
4
- COPY docker_config/nginx/http.conf /etc/nginx/http.conf
5
- COPY docker_config/nginx/tcp.conf /etc/nginx/tcp.conf
4
+ COPY docker_config/nginx/http.conf.template /etc/nginx/http.conf.template
5
+ COPY docker_config/nginx/tcp.conf.template /etc/nginx/tcp.conf.template
6
6
7
7
COPY docker_config/nginx/proxy_params /etc/nginx/proxy_params
8
8
COPY docker_config/nginx/proxy_params_ws /etc/nginx/proxy_params_ws
9
9
10
10
COPY front/dist /var/www/front
11
+
12
+ ARG DNS_RESOLVER
13
+ ENV DNS_RESOLVER ${DNS_RESOLVER}
14
+ RUN envsubst '\$ {DNS_RESOLVER}' </etc/nginx/http.conf.template >/etc/nginx/http.conf && \
15
+ envsubst '\$ {DNS_RESOLVER}' </etc/nginx/tcp.conf.template >/etc/nginx/tcp.conf
Original file line number Diff line number Diff line change 1
1
limit_conn_zone $binary_remote_addr zone=http_ip_conn:16m;
2
2
limit_req_zone $http_x_team_token zone=token_limit:64m rate=2r/s;
3
3
4
- resolver 127.0.0.11 127.0.0.1 valid=10s ipv6=off;
4
+ resolver ${DNS_RESOLVER} valid=10s ipv6=off;
5
5
resolver_timeout 5s;
6
6
7
7
server {
Original file line number Diff line number Diff line change 1
1
limit_conn_zone $binary_remote_addr zone=tcp_ip_conn:16m;
2
2
3
- resolver 127.0.0.11 127.0.0.1 valid=10s ipv6=off;
3
+ resolver ${DNS_RESOLVER} valid=10s ipv6=off;
4
4
resolver_timeout 5s;
5
5
6
6
server {
You can’t perform that action at this time.
0 commit comments