-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
55 lines (50 loc) · 1.58 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
53
54
version: "3.3"
volumes:
nginx_conf:
nginx_vhost:
nginx_html:
services:
nginx:
restart: always
image: adorofeev/nginx-verbose:v2.0
container_name: nginx-frontproxy
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
ports:
- "80:80"
- "443:443"
volumes:
- nginx_conf:/etc/nginx/conf.d
- nginx_html:/usr/share/nginx/html
- "./volumes/includes:/etc/nginx/vhost.d:ro"
- "./volumes/certs:/etc/nginx/certs:ro"
- "./volumes/htpasswd:/etc/nginx/htpasswd:ro"
environment:
# nginx-verbose
- DOCKER_HOST_HOSTNAME=${DOCKER_HOST_HOSTNAME}
- SERVICE_NAME=nginx-proxy
networks:
- nginx-proxy
nginx-gen:
restart: always
image: jwilder/docker-gen
container_name: nginx-gen
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen"
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "./volumes/templates:/etc/docker-gen/templates:ro"
- nginx_conf:/etc/nginx/conf.d
- nginx_html:/usr/share/nginx/html
- "./volumes/includes:/etc/nginx/vhost.d:ro"
- "./volumes/certs:/etc/nginx/certs:ro"
- "./volumes/htpasswd:/etc/nginx/htpasswd:ro"
entrypoint: /bin/sh -c
command: ["/usr/local/bin/docker-gen -notify-sighup nginx-frontproxy -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf"]
networks:
- nginx-proxy
# Run following command to create network, once for each host:
# docker network create -d bridge nginx-proxy
networks:
nginx-proxy:
external: true