- .env / .env.example: TZ=Europe/Berlin und NTP_SERVER=ptbtime1.ptb.de
(offizielle deutsche Zeitreferenz, hohe Verfuegbarkeit)
- app/__init__.py setzt prozessweite Zeitzone frueh via os.environ+tzset
- Leichtgewichtiger SNTP-Client (pure socket, keine deps) prueft den
Uhr-Offset beim Start im Hintergrund-Thread und warnt bei Abweichung >5s
- Dockerfile installiert tzdata und ENV TZ=Europe/Berlin als Fallback
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: Nach Umstellung auf env_file in docker-compose wurden die
relativen Pfade (./data/minicloud.db) aus .env falsch aufgeloest.
basedir zeigte auf / statt /app, dadurch wurde eine neue leere DB
unter /data/ erstellt statt die bestehende unter /app/data/ zu nutzen.
Ergebnis: Alle User weg, Login unmoeglich.
Fix:
- config.py: _resolve_path nutzt Path.cwd() fuer relative Pfade
(in Docker CWD=/app, in Dev CWD=backend/)
- .env.example: Absolute Docker-Pfade als Default
(/app/data/minicloud.db statt ./data/minicloud.db)
mit Kommentar fuer Entwicklungsumgebung
Auf dem Server muss die .env angepasst werden:
DATABASE_PATH=/app/data/minicloud.db
UPLOAD_PATH=/app/data/files
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>