forked from Dynamedia/docker-reverse-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (48 loc) · 1.72 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
version: "3.4"
services:
nginx:
image: dynamedia/docker-nginx:v1.17.3
env_file:
- .env
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy : "true"
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./.data/conf.d:/etc/nginx/conf.d
- ./.data/certs:/etc/nginx/certs:ro
- ./.data/vhosts:/etc/nginx/vhost.d
- ./.data/html:/usr/share/nginx/html
- ./modsecurity/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf.example:/etc/nginx/modsecurity.d/rules/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf
- ./modsecurity/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf.example:/etc/modsecurity.d/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf
nginx-gen:
image: jwilder/docker-gen
command: -notify-sighup nginx-proxy -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
container_name: nginx-proxy-gen
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen : "true"
restart: always
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl
- ./.data/conf.d:/etc/nginx/conf.d
- ./.data/certs:/etc/nginx/certs
- ./.data/vhosts:/etc/nginx/vhost.d
- ./.data/html:/usr/share/nginx/html
letsencrypt-nginx-proxy-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
restart: always
depends_on:
- "nginx"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./.data/conf.d:/etc/nginx/conf.d
- ./.data/certs:/etc/nginx/certs
- ./.data/vhosts:/etc/nginx/vhost.d
- ./.data/html:/usr/share/nginx/html
networks:
default:
external:
name: nginx-proxy