-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
48 lines (43 loc) · 1.23 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
version: '3.7'
services:
wagtail_site:
container_name: wagtail_site
build: ./wagtail_site
command: gunicorn wagtail_site.wsgi:application --bind 0.0.0.0:8000
restart: unless-stopped
expose:
- 8000
environment:
- DEBUG=0
- SECRET_KEY=asuperS3cretK$yshouldgohere
- DJANGO_SETTINGS_MODULE=wagtail_site.settings.production
volumes:
- ./data/static_volume:/code/static
networks:
- wagtailnet
nginx:
container_name: Nginx
build: ./nginx
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- "/path/to/static/data/static_volume:/home/wagtail_site/static"
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
networks:
- wagtailnet
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
container_name: CertBot
image: certbot/certbot
restart: unless-stopped
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
networks:
- wagtailnet
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
wagtailnet: