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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user