-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
53 lines (51 loc) · 1.01 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
version: '2'
services:
web:
build:
context: .
dockerfile: Dockerfile.prod
command: gunicorn gaming_platform.wsgi:application --bind 0.0.0.0:8000
volumes:
- .:/home/app/web
- static_volume:/home/app/web/staticfiles
- media_volume:/home/app/web/mediafiles
expose:
- 8000
restart: always
env_file:
- ./.env
depends_on:
- db
db:
image: postgres:alpine
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- ./.env.db
nginx:
build: ./nginx
restart: always
volumes:
- static_volume:/home/app/web/staticfiles
- media_volume:/home/app/web/mediafiles
ports:
- 80:80
depends_on:
- web
redis:
image: redis:alpine
celery:
restart: always
build:
context: .
dockerfile: Dockerfile.prod
command: python3 manage.py celery
depends_on:
- db
- redis
- web
volumes:
postgres_data:
static_volume:
media_volume: