feat: Docker-Integration hinzugefügt - Dockerfile, docker-compose.yml und .dockerignore erstellt - README.md mit umfassender Docker-Dokumentation erweitert - Multi-Service-Architektur für Hauptservice und Statistik-Service - Lokale Volume-Mappings für .env und .json Dateien - Vollständige Docker-Handhabung dokumentiert
This commit is contained in:
46
docker-compose.yml
Normal file
46
docker-compose.yml
Normal file
@ -0,0 +1,46 @@
|
||||
services:
|
||||
ti-status-checker:
|
||||
build: .
|
||||
container_name: ti-status-checker
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
# .env Datei für Konfiguration
|
||||
- ./.env:/app/.env:ro
|
||||
# JSON-Dateien für Persistierung
|
||||
- ./ti_status_state.json:/app/ti_status_state.json
|
||||
- ./ti_outage_statistics.json:/app/ti_outage_statistics.json
|
||||
environment:
|
||||
# Debug-Modus (kann in .env überschrieben werden)
|
||||
- DBG_MODE=false
|
||||
networks:
|
||||
- ti-status-network
|
||||
# Optional: Cron-ähnliche Ausführung alle 5 Minuten
|
||||
# command: ["sh", "-c", "while true; do python ti_status_checker.py; sleep 300; done"]
|
||||
|
||||
# Optional: Statistik-Service der täglich läuft
|
||||
ti-statistics:
|
||||
build: .
|
||||
container_name: ti-statistics
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./.env:/app/.env:ro
|
||||
- ./ti_outage_statistics.json:/app/ti_outage_statistics.json
|
||||
command: ["python", "ti_status_checker.py", "--stats"]
|
||||
environment:
|
||||
- DBG_MODE=false
|
||||
networks:
|
||||
- ti-status-network
|
||||
# Läuft einmal täglich um 8:00 Uhr
|
||||
# depends_on:
|
||||
# - ti-status-checker
|
||||
|
||||
networks:
|
||||
ti-status-network:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
# Lokale Volumes für Persistierung
|
||||
ti-status-state:
|
||||
driver: local
|
||||
ti-outage-statistics:
|
||||
driver: local
|
||||
Reference in New Issue
Block a user