-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
36 lines (32 loc) · 1.06 KB
/
docker-compose.prod.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
version: '3'
services:
app:
image: atomics42/certification_system-app:master
volumes:
- /var/database/locus_certification_system:/app/certification_system/db
- /var/www/static:/app/static
- /var/media/locus_certification_system:/app/certification_system/media
environment:
- PRODUCTION=true
- SECRET_KEY=YOUR_KEY
- EMAIL_HOST_USER=YOUR_EMAIL
- EMAIL_HOST_PASSWORD=YOUR_PASSWORD
nginx:
image: nginx:1.23-alpine
ports:
- "80:80"
- "443:443"
depends_on:
- app
volumes:
- /var/www/static:/static
- ./data/nginx:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot
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;'"