-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.prod.yml
47 lines (43 loc) · 1022 Bytes
/
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
37
38
39
40
41
42
43
44
45
46
47
version: '3.3'
name: magpai-prod
services:
django:
build: .
restart: unless-stopped
expose:
- "8000"
env_file:
- .env.prod
volumes:
- .:/magpai
- static_volume:/magpai/static
entrypoint: >
sh -c "gunicorn magpai.wsgi:application --bind 0.0.0.0:8000"
database:
image: postgres:16
restart: unless-stopped
expose:
- "5432"
env_file:
- .env.prod
volumes:
- postgres_volume:/var/lib/postgresql/data
nginx:
restart: unless-stopped
env_file:
- .env.prod
build: ./nginx
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
ports:
- 80:80
- 443:443
volumes:
- static_volume:/magpai/static
- ./docker/nginx/certbot/conf:/etc/letsencrypt
- ./docker/nginx/certbot/www:/var/www/certbot
- ./docker/nginx/certbot/.secrets:/var/www/.secrets
depends_on:
- django
volumes:
static_volume:
postgres_volume: