-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx-letsencrypt-swarm.yml
85 lines (81 loc) · 2.02 KB
/
nginx-letsencrypt-swarm.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: "3"
services:
nginx-web:
image: nginx:alpine
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy
restart: unless-stopped
deploy:
placement:
constraints:
- node.role == manager
replicas: 1
ports:
- 80:80
- 443:443
volumes:
- conf:/etc/nginx/conf.d
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs:ro
networks:
- webproxy
logging:
options:
max-size: '4m'
max-file: '10'
nginx-gen:
image: helder/docker-gen
command: -notify "docker-label-sighup com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy" -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen
restart: unless-stopped
deploy:
placement:
constraints:
- node.role == manager
replicas: 1
volumes:
- conf:/etc/nginx/conf.d
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
- /srv/nginx-proxy/docker-gen/templates/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
networks:
- webproxy
logging:
options:
max-size: '4m'
max-file: '10'
nginx-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
environment:
restart: unless-stopped
deploy:
placement:
constraints:
- node.role == manager
replicas: 1
volumes:
- conf:/etc/nginx/conf.d
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- webproxy
logging:
options:
max-size: '4m'
max-file: '10'
networks:
webproxy:
external:
name: webproxy
volumes:
conf:
vhost:
html:
certs: