forked from navigateconsulting/virtual-assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.tls_example.yml
58 lines (49 loc) · 1.31 KB
/
docker-compose.tls_example.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
# Create nginx-proxy network before starting this stack ,
# docker network create nginx-proxy
# also use this network in the virtual_assistant docker-compose file append below lines to the compose file
#networks:
# default:
# external:
# name: nginx-proxy
# Add below environment varibales to the containers which needs to be exposed over SSL, eg ui_trainer
# - VIRTUAL_HOST=subdomain.domain.com
# - VIRTUAL_PORT=port_no
# - LETSENCRYPT_HOST=subdomain.domain.com
# - LETSENCRYPT_EMAIL=user@domain.com
version: '2'
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- conf:/etc/nginx/conf.d
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- dhparam:/etc/nginx/dhparam
- certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
restart: always
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: nginx-proxy-le
depends_on:
- nginx-proxy
volumes_from:
- nginx-proxy
volumes:
- certs:/etc/nginx/certs
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: always
volumes:
conf:
vhost:
html:
dhparam:
certs:
networks:
default:
external:
name: nginx-proxy