feat(scripts): fold generate-secrets.sh into update.sh, auto-mint virtual keys
update.sh now creates .env from .env.example if missing, idempotently fills in every random secret (same logic generate-secrets.sh had, now removed), resolves SEARXNG_LAN_IP from search.home via the host's own DNS, and mints OPENWEBUI_LITELLM_KEY / MEMORY_RETRIEVAL_EMBEDDING_KEY through LiteLLM's own /key/generate API once litellm is up — no more manual Admin UI step for the stack's own two workload keys. Docs updated to point at update.sh as the one command; docs/proxy-key-onboarding.md keeps the manual/API steps as the fallback and for onboarding other workloads. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+19
-15
@@ -1,5 +1,8 @@
|
||||
# Copy to .env and adjust. All values below are defaults baked into
|
||||
# docker-compose.yml — only uncomment/change what you actually want to override.
|
||||
# Copy to .env and adjust — or just run ./scripts/update.sh, which creates
|
||||
# .env from this file and fills in every secret/key below it can generate
|
||||
# itself (see each var's comment). All values below are defaults baked into
|
||||
# docker-compose.yml — only uncomment/change what you actually want to
|
||||
# override.
|
||||
|
||||
# --- llama.cpp / model ---
|
||||
LLAMA_MODEL_FILE=Qwen3.8-27B-UD-Q4_K_XL.gguf
|
||||
@@ -11,8 +14,8 @@ LLAMA_CTX_SIZE=65536
|
||||
|
||||
# --- Open WebUI ---
|
||||
WEBUI_PORT=8008
|
||||
# Required — create an "openwebui" virtual key in LiteLLM's Admin UI first
|
||||
# (see docs/proxy-key-onboarding.md), then paste it here.
|
||||
# Minted automatically by ./scripts/update.sh — leave blank. Manual fallback:
|
||||
# docs/proxy-key-onboarding.md.
|
||||
OPENWEBUI_LITELLM_KEY=
|
||||
|
||||
# --- Lazytainer ---
|
||||
@@ -23,32 +26,33 @@ LAZYTAINER_INACTIVE_TIMEOUT=900
|
||||
EMBEDDING_MODEL_FILE=nomic-embed-text-v1.5.Q8_0.gguf
|
||||
|
||||
# --- SearXNG web search (see docs/research/litellm-searxng-search.md) ---
|
||||
# Required — the litellm container can't resolve search.home's LAN mDNS
|
||||
# name on its own; this becomes an extra_hosts entry. Use a static
|
||||
# DHCP-reserved IP so it doesn't drift.
|
||||
# Resolved automatically by ./scripts/update.sh from search.home on this
|
||||
# host — leave blank. Only set by hand if that resolution fails (e.g.
|
||||
# search.home isn't a static DHCP reservation and its IP drifted).
|
||||
SEARXNG_LAN_IP=
|
||||
|
||||
# --- LiteLLM proxy (see docs/proxy-key-onboarding.md, docs/network-access.md) ---
|
||||
LITELLM_PORT=4000
|
||||
# Required — generate real random values before first run, e.g. `openssl rand -hex 32`.
|
||||
# LITELLM_SALT_KEY encrypts stored data; do not change it after the first run
|
||||
# (existing encrypted data becomes unreadable if you do).
|
||||
# Required — generate a real random value before first run, e.g. `openssl rand -hex 32`.
|
||||
# Random values, filled in automatically by ./scripts/update.sh — leave
|
||||
# blank. LITELLM_SALT_KEY encrypts stored data; do not change it after the
|
||||
# first run (existing encrypted data becomes unreadable if you do).
|
||||
LITELLM_MASTER_KEY=
|
||||
LITELLM_SALT_KEY=
|
||||
LITELLM_DB_PASSWORD=
|
||||
# Admin UI login (https://<proxy>/ui). Without these, LiteLLM falls back to
|
||||
# username "admin" / password = LITELLM_MASTER_KEY — set these instead so the
|
||||
# master key never has to be typed into the browser.
|
||||
# master key never has to be typed into the browser. UI_PASSWORD is filled
|
||||
# in automatically by ./scripts/update.sh if blank.
|
||||
UI_USERNAME=admin
|
||||
UI_PASSWORD=
|
||||
|
||||
# --- Knowledgebase (pgvector + memory-retrieval, see docs/memory-knowledgebase.md) ---
|
||||
# Required — random values, e.g. `openssl rand -hex 32`.
|
||||
# Random value, filled in automatically by ./scripts/update.sh — leave blank.
|
||||
PGVECTOR_DB_PASSWORD=
|
||||
# Auth key memory-retrieval requires on its own API (its SERVER_API_KEY).
|
||||
# Random value, filled in automatically by ./scripts/update.sh — leave blank.
|
||||
MEMORY_RETRIEVAL_API_KEY=
|
||||
# A virtual key memory-retrieval uses to call back into litellm for
|
||||
# embeddings — create it in the Admin UI like any other workload key
|
||||
# (see docs/proxy-key-onboarding.md), name it "memory-retrieval".
|
||||
# embeddings. Minted automatically by ./scripts/update.sh — leave blank.
|
||||
# Manual fallback: docs/proxy-key-onboarding.md.
|
||||
MEMORY_RETRIEVAL_EMBEDDING_KEY=
|
||||
|
||||
Reference in New Issue
Block a user