File tree Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 21
21
22
22
RUN rm /etc/nginx/conf.d/*.conf
23
23
24
+ RUN mkdir -p /etc/nginx/extra-conf.d
25
+
24
26
WORKDIR /usr/src
25
27
26
28
ADD start.sh /usr/src/
27
29
ADD nginx/nginx.conf /etc/nginx/
28
30
ADD nginx/proxy*.conf /usr/src/
31
+ ADD nginx/extra/*.conf /etc/nginx/extra-conf.d/
29
32
30
33
ENTRYPOINT ./start.sh
Original file line number Diff line number Diff line change @@ -64,3 +64,19 @@ To run an SSL termination proxy you must have an existing SSL certificate and ke
64
64
-v /path/to/secrets/htpasswd:/etc/secrets/htpasswd \
65
65
nginx-ssl-proxy
66
66
` ` `
67
+ 4. ** Add additional nginx config**
68
+
69
+ All * .conf from [nginx/extra](nginx/extra) are added during * built* to ** /etc/nginx/extra-conf.d** and get included on startup of the container. Using volumes you can overwrite them on * start* of the container:
70
+
71
+ ` ` ` shell
72
+ docker run \
73
+ -e ENABLE_SSL=true \
74
+ -e TARGET_SERVICE=THE_ADDRESS_OR_HOST_YOU_ARE_PROXYING_TO \
75
+ -v /path/to/secrets/cert.crt:/etc/secrets/proxycert \
76
+ -v /path/to/secrets/key.pem:/etc/secrets/proxykey \
77
+ -v /path/to/secrets/dhparam.pem:/etc/secrets/dhparam \
78
+ -v /path/to/additional-nginx.conf:/etc/nginx/extra-conf.d/additional_proxy.conf \
79
+ nginx-ssl-proxy
80
+ ` ` `
81
+
82
+ That way it is possible to setup additional proxies or modifying the nginx configuration.
Original file line number Diff line number Diff line change
1
+ #this file is intentionally left emtpy, because
2
+ #otherwise docker-compose or the hub fails the build...
Original file line number Diff line number Diff line change 28
28
#gzip on;
29
29
client_max_body_size 20M ;
30
30
include /etc/nginx/conf.d/proxy.conf;
31
+
32
+ #additional config
33
+ include /etc/nginx/extra-conf.d/*;
31
34
}
You can’t perform that action at this time.
0 commit comments