feat(backend): container readiness — BACKEND_EVENTS override, GET /api/health, smoke test in-repo

- journal.py: events.jsonl path overridable via BACKEND_EVENTS (mirrors
  BACKEND_DB) so containers journal onto the data volume
- routes.py: unauthenticated GET /api/health for Docker/Traefik/Komodo probes
- backend/smoke_test.py: the 65-check suite promoted from the scratchpad;
  temp-dir DB + journal, runs anywhere via python -m backend.smoke_test
This commit is contained in:
2026-07-12 10:32:37 +02:00
parent 12db2e719d
commit 5f33eedbb1
3 changed files with 316 additions and 1 deletions
+7
View File
@@ -71,6 +71,13 @@ def _visible_relays(user: dict) -> dict:
}
# ---- health ----
@router.get("/health")
def health():
"""Unauthenticated liveness probe — Docker healthcheck, Traefik, Komodo."""
return {"ok": True, "chargers_connected": len(csms.CONNECTED)}
# ---- login / identity ----
class LoginBody(BaseModel):
username: str