-
Notifications
You must be signed in to change notification settings - Fork 8
/
prod-docker-compose.yml
98 lines (91 loc) · 1.99 KB
/
prod-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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
version: '3.1'
services:
postgres:
image: postgres:${POSTGRES_VERSION}
restart: always
env_file:
- .env
expose:
- ${POSTGRES_PORT}
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-U corpus" ]
interval: 30s
timeout: 30s
retries: 5
start_period: 30s
networks:
- corpus_network
volumes:
- postgres_data:/var/lib/postgresql/data
adminer:
image: adminer
restart: always
expose:
- ${ADMINER_PORT}
env_file:
- .env
networks:
- corpus_network
corpus:
build: corpus
command: /corpus/start.sh
restart: always
expose:
- ${DJANGO_BACKEND_PORT}
ports:
- "465:465"
networks:
- corpus_network
volumes:
- static_files:/corpus/static
- media_files:/corpus/media
depends_on:
postgres:
condition: service_healthy
env_file:
- .env
environment:
- ENVIRONMENT=PRODUCTION
- EMAIL_PROTOCOL=smtp
nginx:
build: nginx
restart: always
depends_on:
- corpus
- postgres
networks:
- corpus_network
ports:
- "80:80"
- "443:443"
volumes:
- static_files:/etc/nginx/staticfiles
- media_files:/etc/nginx/mediafiles
- certbot_etc:/etc/letsencrypt
- certbot_var:/var/lib/letsencrypt
- certbot_www:/var/www/certbot
env_file:
- .env
certbot:
image: certbot/certbot
environment:
- CERTBOT_AGREE=true
volumes:
- certbot_etc:/etc/letsencrypt
- certbot_var:/var/lib/letsencrypt
- certbot_www:/var/www/certbot
depends_on:
- nginx
networks:
- corpus_network
command: certonly --webroot --webroot-path=/var/www/certbot -d ieee.nitk.ac.in --agree-tos --email [email protected] --non-interactive
networks:
corpus_network:
volumes:
static_files:
media_files:
postgres_data:
certbot_etc:
certbot_var:
certbot_www: