-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (45 loc) · 1.09 KB
/
docker-compose.yml
File metadata and controls
47 lines (45 loc) · 1.09 KB
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
services:
discordbot_alembic:
build:
context: .
dockerfile: Dockerfile
container_name: discordbot_alembic
restart: always
env_file: .env
environment:
DOCKER_BUILDKIT: 1
networks:
- postgres_network
command: ["sh", "-c", "uv run --frozen --no-sync alembic upgrade head && touch /tmp/alembic_done && sleep infinity"]
deploy:
restart_policy:
delay: 60s
healthcheck:
test: ["CMD", "sh", "-c", "test -f /tmp/alembic_done"]
interval: 5s
timeout: 5s
retries: 12
start_period: 120s
discordbot:
build:
context: .
dockerfile: Dockerfile
args:
- LOG_DIRECTORY=${LOG_DIRECTORY}
container_name: discordbot
restart: always
env_file: .env
volumes:
- ./logs:${LOG_DIRECTORY}
networks:
- postgres_network
depends_on:
discordbot_alembic:
condition: service_healthy
deploy:
restart_policy:
delay: 60s
command: ["uv", "run", "--frozen", "--no-sync", "python", "-m", "src"]
networks:
postgres_network:
external: true