-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
69 lines (63 loc) · 1.65 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
67
68
69
version: '3.8'
services:
nginx:
image: nginx:latest
container_name: nginx
volumes:
- ./nginx/zsem.smuggr.xyz.conf:/etc/nginx/conf.d/default.conf
- ./certbot/etc:/etc/letsencrypt
- ./certbot/www/certbot:/var/www/certbot
ports:
- "${HOST_PORT:-80}:80"
- "${HOST_PORT_SSL:-443}:443"
environment:
- SERVER_NAME=${DOMAIN}
depends_on:
- goptivum
networks:
- app-network
goptivum:
image: smeggmann99/goptivum:${VERSION}
container_name: goptivum
build:
context: .
dockerfile: dockerfile
environment:
- API_PORT=${API_PORT:-3001}
- DIST_PATH=/app/dist
ports:
- "${API_HOST_PORT:-3001}:${API_PORT:-3001}"
networks:
- app-network
volumes:
- ./build/Goptivum/.env:/app/.env
- goptivum_db:/app/db
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- certbot_etc:/etc/letsencrypt
- certbot_var:/var/lib/letsencrypt
- ./certbot/www/certbot:/var/www/certbot
command: >
certonly
--webroot
--webroot-path=/var/www/certbot
--agree-tos
--email ${CERTBOT_EMAIL:-default@example.com}
--no-eff-email
-d ${DOMAIN}
certbot-renew:
image: certbot/certbot
container_name: certbot-renew
volumes:
- ./certbot/etc:/etc/letsencrypt
- ./certbot/var:/var/lib/letsencrypt
- ./certbot/www/certbot:/var/www/certbot
entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot --deploy-hook 'nginx -s reload'; sleep 12h; done"
networks:
app-network:
volumes:
certbot_etc:
certbot_var:
goptivum_db: