43 lines
1006 B
YAML
43 lines
1006 B
YAML
services:
|
|
db-monitor:
|
|
build: .
|
|
container_name: db-monitor
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${DB_MONITOR_PORT:-9432}:9432"
|
|
environment:
|
|
- DB_MONITOR_DSN=${DB_MONITOR_DSN:-}
|
|
- DB_MONITOR_PORT=9432
|
|
- DB_MONITOR_INTERVAL=${DB_MONITOR_INTERVAL:-15}
|
|
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN:-}
|
|
- TELEGRAM_CHAT_ID=${TELEGRAM_CHAT_ID:-}
|
|
volumes:
|
|
- db-monitor-data:/data
|
|
networks:
|
|
- monitor
|
|
|
|
# Optional: local PostgreSQL for testing
|
|
# Uncomment to test with a local database
|
|
# postgres:
|
|
# image: postgres:16-alpine
|
|
# container_name: db-monitor-postgres
|
|
# restart: unless-stopped
|
|
# environment:
|
|
# POSTGRES_USER: monitor
|
|
# POSTGRES_PASSWORD: monitor123
|
|
# POSTGRES_DB: testdb
|
|
# ports:
|
|
# - "5433:5432"
|
|
# volumes:
|
|
# - postgres-data:/var/lib/postgresql/data
|
|
# networks:
|
|
# - monitor
|
|
|
|
volumes:
|
|
db-monitor-data:
|
|
# postgres-data:
|
|
|
|
networks:
|
|
monitor:
|
|
driver: bridge
|