-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
107 lines (100 loc) · 2.34 KB
/
docker-compose.yml
File metadata and controls
107 lines (100 loc) · 2.34 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
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
services:
redis:
image: redis:8.2.4-alpine3.22
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
redis-commander:
container_name: redis-commander
image: ghcr.io/joeferner/redis-commander:latest
restart: unless-stopped
environment:
- REDIS_HOSTS=local:redis:6379
ports:
- "8081:8081"
depends_on:
redis:
condition: service_healthy
postgres:
image: postgres:14-alpine
expose:
- "5432"
volumes:
- ./postgres:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=fp9iAsd8ufy7p9UF)p98sduYfjOfd98y123!@3
- POSTGRES_DB=winter_dragon
- PGUSER=postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-U", "postgres", "-d", "winter_dragon"]
interval: 5s
timeout: 30s
retries: 6
start_period: 10s
worker-autoscaler:
container_name: worker-autoscaler
build:
context: .
dockerfile: bot-dockerfile
command: uv run python -m winter_dragon.workers.autoscaler
environment:
- REDIS_HOST=redis
volumes:
- ./src:/app/src
- ./config.ini:/app/config.ini
- ./logs:/app/logs
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ""
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
bot:
container_name: discord-bot
build:
context: .
dockerfile: bot-dockerfile
environment:
- REDIS_HOST=redis
volumes:
- ./src:/app/src
- ./config.ini:/app/config.ini
- ./logs:/app/logs
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
worker-autoscaler:
condition: service_healthy
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
depends_on:
- postgres
ports:
- "5050:80"
environment:
- PGADMIN_DEFAULT_EMAIL=admin@example.com
- PGADMIN_DEFAULT_PASSWORD=admin123
volumes:
- ./servers.json:/pgadmin4/servers.json
networks:
- default
volumes:
redis_data:
driver: local