-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
41 lines (40 loc) · 859 Bytes
/
compose.yaml
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
services:
bot:
build: .
restart: on-failure
env_file: .env
depends_on:
- migration
- redis
migration:
build: .
restart: on-failure
env_file: .env
depends_on:
database:
condition: service_healthy
command: [ "alembic", "upgrade", "head" ]
database:
image: postgres:16.4-alpine
restart: on-failure
env_file: .env
volumes:
- type: volume
source: database_data
target: /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
redis:
image: redis:7.4-alpine
restart: on-failure
volumes:
- type: volume
source: redis_data
target: /data
volumes:
database_data:
redis_data: