-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
61 lines (55 loc) · 1.12 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
59
60
61
services:
web_app:
build: .
container_name: web_app
command:
sh -c "
python manage.py makemigrations --noinput &&
python manage.py migrate --noinput &&
python manage.py collectstatic --noinput &&
python3 manage.py runserver 0.0.0.0:8000"
env_file:
- src/.env
ports:
- "8000:8000"
volumes:
- "./src:/app"
depends_on:
- postgres_db
- redis_db
postgres_db:
image: postgres:16
container_name: postgres_db
env_file:
- src/.env
ports:
- "5431:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
redis_db:
image: redis:7.0.15
container_name: redis_db
ports:
- "6378:6379"
volumes:
- redis_data:/data
celery_worker:
build: .
command: celery -A config worker --loglevel=info
volumes:
- ./src:/app
depends_on:
- web_app
- redis_db
celery_beat:
build: .
command: celery -A config beat --loglevel=info
volumes:
- ./src:/app
depends_on:
- web_app
- redis_db
- celery_worker
volumes:
postgres_data:
redis_data: