-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.v2.yml
42 lines (38 loc) · 1.28 KB
/
docker-compose.v2.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
version: '2.1'
services:
proxy:
image: jwilder/nginx-proxy
container_name: proxy
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
#- "/etc/nginx/vhost.d"
#- "/etc/nginx/certs"
#- "/usr/share/nginx/html"
- /var/run/docker.sock:/tmp/docker.sock
nginx-gen:
image: jwilder/docker-gen
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen: "true"
command: -notify-sighup proxy -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
#entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
container_name: nginx-gen
restart: unless-stopped
volumes:
#- ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt
restart: unless-stopped
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
volumes_from:
- "proxy"
environment:
NGINX_DOCKER_GEN_CONTAINER: nginx-gen
NGINX_PROXY_CONTAINER: proxy