-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
90 lines (80 loc) · 1.57 KB
/
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
services:
web:
build: .
command: ["gunicorn", "--bind", ":8000", "backend.wsgi:application"]
# command: ["python", "manage.py", "runserver", "0.0.0.0:8000"]
volumes:
- .:/app
- media_volume:/app/media/
ports:
- "8000:8000"
depends_on:
- db
- redis
env_file:
- .env
networks:
- backend-network
db:
image: postgres
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
networks:
- backend-network
celery-beat:
build: .
command: ["celery", "-A", "backend", "beat", "--loglevel=info"]
volumes:
- .:/app
- .:/app
depends_on:
- db
env_file:
- .env
networks:
- backend-network
celery-worker:
build: .
command: ["celery", "-A", "backend", "worker", "--loglevel=info"]
volumes:
- .:/app
depends_on:
- db
- redis
env_file:
- .env
networks:
- backend-network
redis:
image: "redis:alpine"
ports:
- "6379:6379"
networks:
- backend-network
daphne:
build: .
command: daphne -b 0.0.0.0 -p 8001 backend.asgi:application
volumes:
- .:/app
ports:
- "8001:8001"
depends_on:
- db
# - web
- redis
env_file:
- .env
environment:
- DJANGO_SETTINGS_MODULE=backend.settings
networks:
- backend-network
volumes:
db_data:
media_volume:
networks:
backend-network:
driver: bridge