-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
54 lines (49 loc) · 1.27 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
version: '3.8'
services:
bot:
container_name: bot
build: ./
restart: on-failure
command: python src/tactic/presentation/bot.py
env_file:
- .env
volumes:
- ./src/tactic/infrastructure/db/migrations/versions:/app/infrastructure/db/migrations/versions
depends_on:
- migration
- bot_redis
migration:
container_name: migration
build: ./
restart: on-failure
env_file:
- .env
depends_on:
db:
condition: service_healthy
command: [ "alembic", "upgrade", "head" ]
db:
container_name: db
image: postgres:14.5-alpine
restart: on-failure
env_file:
- .env
volumes:
- db_data:/var/lib/postgresql/data/
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 2s
timeout: 60s
retries: 10
start_period: 5s
bot_redis:
container_name: redis
image: redis:7.0.4-alpine
restart: on-failure
ports:
- "6379:6378"
volumes:
- redis_data:/data
volumes:
db_data:
redis_data: