-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
61 lines (56 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
55
56
57
58
59
60
61
version: '3.8'
services:
broker:
container_name: broker
image: arm64v8/eclipse-mosquitto:1.5.10
ports:
- 1883:1883
mongo_ns:
container_name: mongo_ns
image: mongo:4.4.18
restart: always
environment:
- MONGO_INITDB_DATABASE=nsdb
volumes:
- ./data/mongo_ns:/data/db
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
nightscout:
container_name: nightscout
image: waperr/nightscout-rpi:latest
restart: always
ports:
- 1337:1337
links:
- mongo_ns
- broker
depends_on:
- mongo_ns
env_file:
- .env
volumes:
- ./nightscout.sh:/home/node/app/nightscout.sh
command: /home/node/app/nightscout.sh
nginx:
image: arm64v8/nginx
container_name: nginx
restart: unless-stopped
env_file:
- .env
volumes:
- ./data/nginx:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
links:
- nightscout
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
command: /bin/sh -c "envsubst '$${NS_HOST}' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\""
certbot:
image: certbot/certbot:arm64v8-v1.3.0
container_name: certbot
restart: unless-stopped
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"