-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
110 lines (102 loc) · 1.92 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
services:
django-app:
build:
context: ./app
container_name: django-app
env_file:
- ./.env.dev.app
ports:
- "8000:8000"
volumes:
- ./backend_static:/app/static
- ./media:/app/files
- ./app:/app
depends_on:
- db
networks:
- app_network
redis:
container_name: redis
image: redis
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- app_network
flower:
container_name: flower
image: mher/flower
ports:
- "5555:5555"
command: celery flower
env_file:
- ./.env.dev.db
depends_on:
- celery
- redis
- rabbitmq
networks:
- app_network
rabbitmq:
image: rabbitmq:management
restart: always
container_name: rabbitmq
ports:
- 5672:5672
- 15672:15672
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 10s
timeout: 5s
retries: 5
networks:
- app_network
db:
image: postgres:13
container_name: database
env_file:
- ./.env.dev.db
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- app_network
celery:
container_name: celery
restart: always
build:
context: ./app
command: celery -A khatamat_b worker -l INFO
volumes:
- ./app:/app
env_file:
- ./.env.dev.app
depends_on:
- django-app
- redis
networks:
- app_network
nginx:
image: nginx:latest
container_name: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./backend_static:/app/static
- ./media:/files
ports:
- "80:80"
depends_on:
- django-app
networks:
- app_network
networks:
app_network:
driver: bridge
volumes:
postgres_data:
backend_static:
media:
external: true