-
Notifications
You must be signed in to change notification settings - Fork 4
/
compose.staging.yml
42 lines (40 loc) · 1.14 KB
/
compose.staging.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
version: '3.7'
#volumes:
# asset:
services:
django:
build:
context: .
dockerfile: ./docker/Dockerfile_prod
expose:
- 8001
command: /srv/start_prod
restart: always
nginx:
image: nginx:alpine
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./docker/nginx-django-staging.conf:/etc/nginx/conf.d/ct22.conf
- ../ct22-volumes/static:/ct22-volumes/static
- ../ct22-volumes/certbot/conf:/etc/letsencrypt
- ../ct22-volumes/certbot/www:/var/www/certbot
#- ../basdb-volumes/media:/basdb-volumes/media
- ../ct22-volumes/logs/nginx:/var/log/nginx
#- asset:/asset
command: '/bin/sh -c ''while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'''
links:
- django:django
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "3"
certbot:
image: certbot/certbot
volumes:
- ../ct22-volumes/certbot/conf:/etc/letsencrypt
- ../ct22-volumes/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"