From e82b7543866cf8c3a592bbd906c70686cdc542c4 Mon Sep 17 00:00:00 2001 From: Bot Date: Mon, 7 Sep 2026 21:43:05 -0700 Subject: [PATCH] =?UTF-8?q?Add=20ai/ai.env.template=20=E2=80=94=20full-fil?= =?UTF-8?q?e=20authoritative=20env=20template=20(AI=5F=5F*=20nami?= =?UTF-8?q?ng)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Carried over from secrets-provisioning-v2 (PR #15) post-rebase. Key names match exactly what current ai/ai.yaml references; MCPO_API_KEY stays unprefixed (ai.yaml consumes it unprefixed for both mcpo services). Placeholder names match the CI env vars declared in deploy.yml's provision-secrets block, including the normalized AI_OPEN_WEBUI_OAUTH_CLIENT_SECRET (fixing main's WEB_UI/WEBUI mismatch that currently renders an EMPTY OAuth client secret into ai.env). NEW Woodpecker secret required before merge: ai_mcpo_api_key. --- ai/ai.env.template | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 ai/ai.env.template diff --git a/ai/ai.env.template b/ai/ai.env.template new file mode 100644 index 0000000..d3c34d9 --- /dev/null +++ b/ai/ai.env.template @@ -0,0 +1,55 @@ +# ───────────────────────────────────────────────────────────────────────────── +# ai.env.template — AUTHORITATIVE template for ai/ai.env (rendered by +# deploy/provision-stack.py per secrets/secrets-map.yaml). +# +# - This file IS the complete key list for ai.env. The whole file is +# rendered on every provisioning run — no line surgery, so a key can +# never silently go missing again (root cause of the 2026-09-03 outage). +# - Key names match EXACTLY what ai/ai.yaml references (AI__* +# naming adopted on main 2026-09-06). +# - Non-secret config lives here as LITERAL values (visible, reviewable). +# - Secret values are dollar-brace placeholders resolved from the CI env +# (Woodpecker from_secret vars) at provisioning time. provision-stack.py +# FAILS HARD if any placeholder is missing/empty. +# - The rendered ai/ai.env exists only on the host (gitignored). +# - Rendered by provision-stack.py, NOT Woodpecker's yaml preprocessor — +# single-dollar placeholders are safe here (deploy.yml's double-dollar +# rule does NOT apply to this file). +# +# Consumed by ai/ai.yaml. DOMAIN_NAME comes from deploy/global.env, not here. +# ───────────────────────────────────────────────────────────────────────────── + +# ── LiteLLM (non-secret config) ────────────────────────────────────────────── +AI_AWS_REGION_NAME=us-east-2 +AI_LITELLM_MODIFY_PARAMS=False +AI_LITELLM_DATABASE_MIGRATIONS=True + +# ── LiteLLM (secrets) ──────────────────────────────────────────────────────── +AI_AWS_ACCESS_KEY_ID=${AI_AWS_ACCESS_KEY_ID} +AI_AWS_SECRET_ACCESS_KEY=${AI_AWS_SECRET_ACCESS_KEY} +AI_LITELLM_MASTER_KEY=${AI_LITELLM_MASTER_KEY} +AI_LITELLM_SALT_KEY=${AI_LITELLM_SALT_KEY} +# Full connection URL is itself a secret (ai_litellm_database_url) — the +# URL structure never appears in git. +AI_LITELLM_DATABASE_URL=${AI_LITELLM_DATABASE_URL} +AI_LITELLM_POSTGRES_PASSWORD=${AI_LITELLM_POSTGRES_PASSWORD} + +# ── Open WebUI (non-secret config) ─────────────────────────────────────────── +AI_OPEN_WEBUI_URL=https://ai.bryanmail.net +AI_OPEN_WEBUI_ENABLE_OAUTH_SIGNUP=true +AI_OPEN_WEBUI_OAUTH_MERGE_ACCOUNTS_BY_EMAIL=true +AI_OPEN_WEBUI_OAUTH_PROVIDER_NAME=Authentik +AI_OPEN_WEBUI_OPENID_PROVIDER_URL=https://auth.bryanmail.net/application/o/open-web-ui/.well-known/openid-configuration +# OAuth client ID is a public identifier by OAuth2 design (it is sent to the +# browser); the client SECRET below is the protected credential. +AI_OPEN_WEBUI_OAUTH_CLIENT_ID=hVmhi1dS3TnG2cUw5QwLOx5FDLSWtnQUdZyeB5zK +AI_OPEN_WEBUI_OAUTH_SCOPES=openid email profile +AI_OPEN_WEBUI_OPENID_REDIRECT_URI=https://ai.bryanmail.net/oauth/oidc/callback + +# ── Open WebUI (secrets) ───────────────────────────────────────────────────── +AI_OPEN_WEBUI_SECRET_KEY=${AI_OPEN_WEBUI_SECRET_KEY} +AI_OPEN_WEBUI_DATABASE_URL=${AI_OPEN_WEBUI_DATABASE_URL} +AI_OPEN_WEBUI_OAUTH_CLIENT_SECRET=${AI_OPEN_WEBUI_OAUTH_CLIENT_SECRET} + +# ── mcpo / mcpo-critical (secrets) ─────────────────────────────────────────── +MCPO_API_KEY=${AI_MCPO_API_KEY}