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:
2025-08-11 10:03:40 +02:00
parent f79fc24b3b
commit 550b5261e1
4 changed files with 262 additions and 5 deletions

46
docker-compose.yml Normal file
View 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