-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
58 lines (56 loc) · 1.14 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: "3"
services:
educa:
build:
context: .
dockerfile: Dockerfile.prod
expose:
- 80
container_name: educa
volumes:
- static_volume:/home/app/educa/staticfiles
- media_volume:/home/app/educa/mediafiles
command: gunicorn educa.wsgi:application -b 0.0.0.0:80 --workers=3
env_file:
- ./.env.prod
depends_on:
- db
dpchannel:
build:
context: .
dockerfile: Dockerfile.prod
expose:
- 80
container_name: dpchannel
env_file:
- ./.env.prod
command: daphne -b 0.0.0.0 -p 80 educa.asgi:application
depends_on:
- educa
db:
image: postgres:13.0-alpine
env_file:
- ./.env.prod.db
volumes:
- postgres_data:/var/lib/postgresql/data/
nginx:
build: ./nginx
volumes:
- static_volume:/home/app/educa/staticfiles
- media_volume:/home/app/educa/mediafiles
ports:
- "80:80"
depends_on:
- educa
redis:
restart: always
image: redis:latest
ports:
- "6379:6379"
volumes:
- redisdata:/data
volumes:
postgres_data:
static_volume:
media_volume:
redisdata: