diff --git a/.env.example b/.env.example index 260695f..b25c223 100644 --- a/.env.example +++ b/.env.example @@ -64,6 +64,9 @@ GRAFANA_ROOT_URL=http://localhost:3001/ # (empty = role skipped; datasource then can't connect). PROCUREMENT_BOT_OBS_READER_PASSWORD= OBS_READER_USER=obs_reader +# Bot media second copy in MinIO (bucket is auto-created; empty endpoint = off) +BOT_MINIO_ENDPOINT=minio:9000 +BOT_MINIO_BUCKET=bot-media # OpenPanel (product analytics) — client id/secret from the OpenPanel project OPENPANEL_API_URL=http://openpanel-api:3333 OPENPANEL_CLIENT_ID= diff --git a/backend/app/config.py b/backend/app/config.py index fb3a4bd..a1200f1 100644 --- a/backend/app/config.py +++ b/backend/app/config.py @@ -39,6 +39,9 @@ class Settings(BaseSettings): MINIO_SECRET_KEY: str = "minioadmin" MINIO_BUCKET: str = "procurement-files" MINIO_SECURE: bool = False + # Second bucket the BOT dual-writes its media into (voices/attachments); + # the admin bot-media endpoint streams from here first, disk as fallback. + BOT_MEDIA_BUCKET: str = "bot-media" # Security token for standalone wizard review URL (must match bot) DRAFT_TOKEN_SECRET: str = "procurement-draft-secret-change-in-prod-v7" diff --git a/backend/app/main.py b/backend/app/main.py index 94cba30..522a4e2 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -236,6 +236,10 @@ from app.routers.auth import router as _auth_router # noqa: E402 # routes accept a short-lived signed ?t= token as well as a Bearer session. from app.routers.files import router as _files_router # noqa: E402 from app.routers.drafts import router as _drafts_router # noqa: E402 +# bot-metrics: every endpoint carries its own require_role("admin"); the media +# GET additionally accepts the short-lived signed ?t= token (same reason as +# files) so