-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
66 lines (64 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
62
63
64
65
66
version: "3"
services:
app:
build:
context: .
dockerfile: Dockerfile
volumes:
- /etc/letsencrypt:/etc/letsencrypt
ports:
- "0.0.0.0:8091:8091"
environment:
- DOMAIN=${DOMAIN}
- PRIVATE_KEY_PATH=${PRIVATE_KEY_PATH}
- CERTIFICATE_PATH=${CERTIFICATE_PATH}
restart: always
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
labels:
ofelia.enabled: "true"
# Restart app every day at 00:00
ofelia.job-exec.app.schedule: "0 0 * * *"
ofelia.job-exec.app.command: "killall node"
certbot:
image: certbot/certbot
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /etc/letsencrypt:/etc/letsencrypt
- /var/www/certbot:/var/www/certbot
- /var/lib/letsencrypt:/var/lib/letsencrypt
- /var/log/letsencrypt:/var/log/letsencrypt
entrypoint: ''
command: sleep infinity
environment:
- DOMAIN=${DOMAIN}
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
labels:
ofelia.enabled: "true"
# Renew certificate every 12 hours
ofelia.job-exec.certbot.schedule: "@every 12h"
ofelia.job-exec.certbot.command: "certbot renew --quiet --no-self-upgrade"
ofelia:
image: mcuadros/ofelia:latest
depends_on:
- app
- certbot
command: daemon --docker
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"