-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
119 lines (110 loc) · 2.34 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
111
112
113
114
115
116
117
118
119
version: '3.8'
services:
bot:
build:
context: .
dockerfile: ./bot/Dockerfile
restart: always
container_name: bot
depends_on:
- web
env_file:
- .env
web:
build:
context: .
dockerfile: ./email_bot_web/Dockerfile
restart: always
container_name: web
command: ["./entrypoint.sh", "web"]
volumes:
- email_bot_static_value:/app/web-static/
- email_bot_media_value:/app/web-media/
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "8000:8000"
env_file:
- .env
db:
image: postgres:15-alpine
restart: always
container_name: db
ports:
- "5432:5432"
volumes:
- email_bot_pgdata:/var/lib/postgresql/data/
env_file:
- .env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 30s
retries: 5
start_period: 80s
redis:
image: "redis:alpine"
restart: always
container_name: redis
volumes:
- email_bot_redis_data:/data
expose:
- "6379"
env_file:
- .env
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 10s
timeout: 30s
retries: 5
start_period: 80s
celery_worker:
build:
context: .
dockerfile: ./email_bot_web/Dockerfile
container_name: celery_worker
command: ["./entrypoint.sh", "celery"]
depends_on:
- web
- db
- redis
env_file:
- .env
celery_beat:
build:
context: .
dockerfile: ./email_bot_web/Dockerfile
container_name: celery_beat
command: ["./entrypoint.sh", "beat"]
depends_on:
- web
- db
- redis
env_file:
- .env
flower:
build:
context: .
dockerfile: ./email_bot_web/Dockerfile
env_file:
- .env
container_name: flower_app
command: ["./entrypoint.sh", "flower"]
depends_on:
- redis
- celery_beat
- celery_worker
ports:
- "5555:5555"
volumes:
email_bot_pgdata:
name: email_bot_pgdata
email_bot_static_value:
name: email_bot_static_value
email_bot_media_value:
name: email_bot_media_value
email_bot_redis_data:
name: email_bot_redis_data