-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (55 loc) · 1.78 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
55
56
57
58
59
60
version: "2.1"
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
ports:
- 80:80
- 443:443
environment:
- DEFAULT_HOST=evin-records.dev
volumes:
- ${SERVER_PATH}/nginx/conf.d:/etc/nginx/conf.d
- ${SERVER_PATH}/nginx/vhost.d:/etc/nginx/vhost.d:rw
- ${ROOT_PATH}/html:/usr/share/nginx/html
- ${SERVER_PATH}/nginx/certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
restart: unless-stopped
networks:
- default
nginx-gen:
image: jwilder/docker-gen
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen: "true"
#command: -notify-sighup ${NGINX_WEB} -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_WEB} -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
container_name: ${DOCKER_GEN}
restart: unless-stopped
volumes_from: [nginx-proxy]
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./.server/templates/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:rw
networks:
- default
nginx-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: ${LETS_ENCRYPT}
restart: unless-stopped
depends_on:
- nginx-proxy
- nginx-gen
restart: unless-stopped
volumes_from: [nginx-proxy]
volumes:
- ${SERVER_PATH}/nginx/certs:/etc/nginx/certs:rw
environment:
NGINX_DOCKER_GEN_CONTAINER: ${DOCKER_GEN}
NGINX_PROXY_CONTAINER: ${NGINX_WEB}
networks:
- default
networks:
default:
external:
name: ${NETWORK}