-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (50 loc) · 1.31 KB
/
Copy pathdocker-compose.yml
File metadata and controls
52 lines (50 loc) · 1.31 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
services:
db:
image: mysql:8
container_name: healthchecker-db
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: healthchecker
MYSQL_USER: healthchecker
MYSQL_PASSWORD: healthchecker
ports:
- "3307:3306"
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 2s
timeout: 5s
retries: 5
healthcheckbot:
build: .
depends_on:
db:
condition: service_healthy
environment:
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN}
ALLOWED_CHAT_IDS: ${ALLOWED_CHAT_IDS}
DB_HOST: db
DB_PORT: 3306
DB_USER: healthchecker
DB_PASSWORD: healthchecker
DB_NAME: healthchecker
CHECK_INTERVAL_SEC: "60"
DEFAULT_ALERT_DAYS: "7"
RETENTION_DAYS: "7"
LOG_LEVEL: "INFO"
DEGRADATION_ENABLED: "true"
DEGRADATION_WINDOW_SIZE: "20"
DEGRADATION_TREND_SIZE: "5"
DEGRADATION_MIN_CHECKS: "10"
TTFB_DEGRADATION_MULTIPLIER: "1.5"
TTFB_WARN_FLOOR_MS: "1000"
DEGRADATION_FAILURE_RATIO: "0.5"
DEGRADATION_MIN_FAILURES: "3"
DEGRADATION_MIN_TTFB_SAMPLES: "5"
volumes:
- ./src:/app
- ./pyproject.toml:/app/pyproject.toml
volumes:
mysql_data: