forked from owntracks/docker-recorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-ssl.yml
88 lines (83 loc) · 2.43 KB
/
docker-compose-ssl.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
86
87
88
version: '2'
services:
nginx-proxy:
image: nginxproxy/nginx-proxy:alpine
container_name: nginx
ports:
- 80:80
- 443:443
volumes:
- ./proxy/conf.d:/etc/nginx/conf.d
- ./proxy/proxy.conf:/etc/nginx/proxy.conf
- ./proxy/vhost.d:/etc/nginx/vhost.d
- ./proxy/html:/usr/share/nginx/html
- ./proxy/certs:/etc/nginx/certs:ro
- ./proxy/htpasswd:/etc/nginx/htpasswd:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
- acme:/etc/acme.sh
networks:
- proxy-tier
letsencrypt-nginx-proxy-companion:
image: nginxproxy/acme-companion
container_name: letsencrypt-companion
depends_on: [nginx]
volumes_from:
- nginx-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./proxy/certs:/etc/nginx/certs:rw
- acme:/etc/acme.sh
#environment:
#- ACME_CA_URI=https://acme-staging-v02.api.letsencrypt.org/directory
#User above line for testing the setup
otrecorder:
image: owntracks/recorder
restart: unless-stopped
environment:
- VIRTUAL_HOST=owntracks.domain.com
- VIRTUAL_PORT=8083
- LETSENCRYPT_HOST=owntracks.domain.com
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
- OTR_USER="user"
- OTR_PASS="password"
- OTR_HOST=mqtt.domain.com
- OTR_PORT=8883
- OTR_CAFILE=/config/ca.pem
#content of the file above from https://gist.github.com/jpmens/211dbe7904a0efd40e2e590066582ae5
#which is 6 certificates in one file. !!!This turns out to be important!!!
volumes:
- ./owntracks/config:/config
- ./owntracks/store:/store
- ./proxy/certs:/etc/letsencrypt/live:ro #probably this line is not needed
networks:
- proxy-tier
mqtt:
container_name: mqtt
image: eclipse-mosquitto
environment:
- VIRTUAL_HOST=mqtt.domain.com
- LETSENCRYPT_HOST=mqtt.domain.com
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
ports:
- 1883:1883
- 8883:8883
- 8083:8083
volumes:
- ./mosquitto/data:/mosquitto/data
- ./mosquitto/logs:/mosquitto/logs
- ./mosquitto/conf:/mosquitto/config
- ./mosquitto/conf/passwd:/etc/mosquitto/passwd
- ./proxy/certs:/etc/letsencrypt/live:ro
restart: unless-stopped
volumes:
acme:
networks:
proxy-tier:
external:
name: nginx-proxy