docs: fix version, terminology and docker-compose reference consistency

This commit is contained in:
2026-08-02 07:31:00 +02:00
parent 708ba5c20a
commit f413cabfc0
4 changed files with 22 additions and 13 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ Kein Linter konfiguriert. Bei Bedarf: `ruff check app/` oder `black app/`
1. **Ein-Datei-App**: `main.py` enthält alle Endpunkte und Logik → bewusst simpel gehalten
2. **Keine DB**: Alles In-Memory → Neustart = Cache-Verlust (akzeptabel)
3. **Exclude-Filter**: Whitelist-Logik (alles anzeigen AUSSER exclude_destinations)
3. **Exclude-Filter**: Blacklist-Logik (alles anzeigen AUSSER exclude_destinations)
4. **Template-Rendering**: Server-seitig via Jinja2, kein Frontend-Framework
5. **Config-Pfad**: `CONFIG_PATH` Env-Var oder `config.yaml` als Fallback
@@ -70,7 +70,7 @@ Kein Linter konfiguriert. Bei Bedarf: `ruff check app/` oder `black app/`
## Sicherheit
- Keine Secrets im Code
- Config.yaml kann sensible Stationsnamen enthalten → Volume-Mount, nicht ins Image
- Config.yaml kann sensitive Stationsnamen enthalten → in Produktion als Read-Only-Volume-Mount überschreiben; das Image enthält nur eine Default-Config
- GHCR-Token nur in CI, nie im Repo
## Deployment-Hinweise
+16 -7
View File
@@ -53,18 +53,20 @@ uvicorn app.main:app --reload
```bash
docker build -t mvg-departures .
docker run -p 8000:8000 -v $(pwd)/config.yaml:/app/config.yaml mvg-departures
docker run -p 8000:8000 -e TZ=Europe/Berlin -v $(pwd)/config.yaml:/app/config.yaml mvg-departures
```
## Deployment (Beispiel docker-compose, nicht im Repo)
## Deployment
Siehe `docker-compose.yml` im Repo als Referenz. Beispiel (Owner anpassen):
```yaml
services:
mvg-departures:
image: ghcr.io/<github-user>/mvg-departures:latest
image: ghcr.io/skoelle/mvg-departures:latest
container_name: mvg-departures
ports:
- "8090:8000"
- "8000:8000"
volumes:
- ./config.yaml:/app/config.yaml:ro
environment:
@@ -108,25 +110,32 @@ https://www.mvg.de/api/bgw-pt/v3/departures?globalId=de:09162:910&limit=10&trans
```
mvg-departures/
├── app/
│ ├── main.py # FastAPI-App, Endpunkte, Caching
│ ├── __init__.py
│ ├── main.py # FastAPI-App, Endpunkte, Caching
│ ├── config.py # Config-Loader (YAML → Dataclasses)
│ └── templates/
│ └── index.html # Jinja2-Template (Mobile-UI)
├── config.yaml # Stationskonfiguration
├── docker-compose.yml # Deployment-Beispiel
├── requirements.txt # Python-Dependencies
├── Dockerfile
├── .dockerignore
├── .gitignore
├── AGENTS.md
├── SPEC.md
├── renovate.json
└── .github/workflows/
└── build.yml # CI/CD: Docker-Build + GHCR-Push
```
## Tech-Stack
- **Runtime**: Python 3.12
- **Runtime**: Python 3.14
- **Framework**: FastAPI + Uvicorn
- **Templating**: Jinja2 (server-seitig)
- **MVG-API**: `mvg` Python-Client (oeffentlich, kein Auth noetig)
- **Config**: YAML via `pyyaml`
- **Container**: Docker (python:3.12-slim)
- **Container**: Docker (python:3.14-slim)
## Caching
+3 -3
View File
@@ -16,7 +16,7 @@ mvg-departures/
│ └── index.html # Jinja2-Template (mobile HTML-Ansicht)
├── config.yaml # Stationskonfiguration
├── requirements.txt # Python-Dependencies
├── Dockerfile # Multi-Stage Build (python:3.12-slim)
├── Dockerfile # Single-Stage Build (python:3.14-slim)
├── docker-compose.yml # Deployment-Beispiel
└── .github/workflows/
└── build.yml # CI/CD: Docker-Build + GHCR-Push
@@ -26,13 +26,13 @@ mvg-departures/
| Komponente | Technologie |
|---|---|
| Runtime | Python 3.12 |
| Runtime | Python 3.14 |
| Web-Framework | FastAPI |
| Templating | Jinja2 |
| API-Client | `mvg` (PyPI) |
| Config | YAML (`pyyaml`) |
| Server | Uvicorn |
| Container | Docker (python:3.12-slim) |
| Container | Docker (python:3.14-slim) |
| CI/CD | GitHub Actions → GHCR |
## 4. Datenfluss
+1 -1
View File
@@ -1,4 +1,4 @@
"""Config-Loader fuer die Stationsliste aus config.yaml."""
"""Config-Loader für die Stationsliste aus config.yaml."""
import os
import yaml
from dataclasses import dataclass, field