-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (55 loc) · 1.47 KB
/
docker-compose.yml
File metadata and controls
59 lines (55 loc) · 1.47 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
services:
# PostgreSQL Service
postgres:
image: postgres:15
container_name: postgres_db
environment:
POSTGRES_USER: ${POSTGRES_USER:-botuser}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-botpassword}
POSTGRES_DB: ${POSTGRES_DB:-botdb}
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-botuser} -d ${POSTGRES_DB:-botdb}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql/data
# MySQL Service (commented out)
# mysql:
# image: mysql:8.1
# container_name: mysql_db
# environment:
# MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-rootpassword}
# MYSQL_DATABASE: ${MYSQL_DATABASE:-botdb}
# MYSQL_USER: ${MYSQL_USER:-botuser}
# MYSQL_PASSWORD: ${MYSQL_PASSWORD:-botpassword}
# ports:
# - "3306:3306"
# volumes:
# - mysql_data:/var/lib/mysql
# SQLite Service (commented out as it's file-based)
# sqlite:
# image: nouchka/sqlite3
# container_name: sqlite_db
# volumes:
# - ./sqlite_data:/data
# Bot Service
bot:
build:
context: .
dockerfile: Dockerfile
image: quizbot:1.0
container_name: quizbot_telegram_bot
depends_on:
postgres:
condition: service_healthy
volumes:
- ./config.yml:/app/config.yml
- ./alembic.ini:/app/alembic.ini
command: python -m bot
volumes:
postgres_data:
# mysql_data:
# sqlite_data: