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:
+4
-1
@@ -5,12 +5,15 @@ raw ground truth behind the queryable store (store.py).
|
||||
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
HERE = Path(__file__).resolve().parent
|
||||
EVENTS_PATH = HERE / "events.jsonl"
|
||||
# BACKEND_EVENTS: in containers the journal must land on the data volume, not
|
||||
# in the ephemeral image layer. Mirrors the BACKEND_DB override in store.py.
|
||||
EVENTS_PATH = Path(os.environ.get("BACKEND_EVENTS", HERE / "events.jsonl"))
|
||||
|
||||
log = logging.getLogger("journal")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user