feat: REST API + Web-Frontend für Kalenderübersicht

- FastAPI Backend mit /api/events, /api/events/{id}, /api/health Endpoints
- Optionale Suche nach Event-Titel (Query Parameter ?search=...)
- Jinja2 Web-Frontend auf / mit Suchfeld
- Shared DB Connection Module (api/database.py)
- Docker Compose: calendar-api Service hinzugefügt
- Sync.py refactored: nutzt shared database.py
This commit is contained in:
2026-08-01 16:12:07 +02:00
parent b8c8c68f94
commit b30c02beb8
11 changed files with 840 additions and 12 deletions
+21
View File
@@ -5,6 +5,7 @@ services:
image: ghcr.io/skoelle/calender_sync:latest
container_name: calendar-sync
restart: unless-stopped
command: ["python", "sync.py"]
environment:
- ICS_URL=${ICS_URL}
@@ -22,6 +23,26 @@ services:
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- HEALTHCHECK_URL=${HEALTHCHECK_URL:-}
networks:
- docker-backend
calendar-api:
image: ghcr.io/skoelle/calender_sync:latest
container_name: calendar-api
restart: unless-stopped
command: ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000"]
ports:
- "${API_PORT:-8000}:8000"
environment:
- DB_HOST=${DB_HOST:-mariadb.fritz.box}
- DB_PORT=${DB_PORT:-3306}
- DB_NAME=${DB_NAME:-calendar_sync}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
labels:
- "com.centurylinklabs.watchtower.enable=true"