fix(searxng): Env-Substitution über Python statt !env-YAML-Tag
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 1m15s

SearXNG v2026 kennt keinen !env-YAML-Constructor — Container crasht
mit „could not determine a constructor for the tag '!env'". Fix: wir
mounten settings.yml read-only auf /config-src, und ein Entrypoint-Hook
schreibt beim Start eine expandierte Fassung nach /etc/searxng/settings.yml
(mit os.path.expandvars — Python ist im Image, envsubst fehlt).

- settings.yml: api_key nutzt jetzt ${BRAVE_API_KEY} statt !env.
- docker-compose.prod.yml: searxng-Container bekommt entrypoint-
  Override, reicht BRAVE_API_KEY + SEARXNG_SECRET als Env durch und
  expandiert das YAML vor exec.

Leerer Key ist weiterhin ok — Brave antwortet dann mit 401, andere
Engines bleiben unberührt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-18 13:56:18 +02:00
parent 553bf4f924
commit 49d4e60a1c
2 changed files with 23 additions and 3 deletions

View File

@@ -46,7 +46,10 @@ engines:
shortcut: br
categories: [general, web]
timeout: 6.0
api_key: !env BRAVE_API_KEY
# Wert wird beim Container-Start durch Python-os.path.expandvars aus der
# BRAVE_API_KEY-Env-Variable eingesetzt (siehe docker-compose.prod.yml
# entrypoint-Override). SearXNG selbst hat kein !env-Tag.
api_key: "${BRAVE_API_KEY}"
disabled: false
# DuckDuckGo: Standard-Scraper, 3s-Default war zu knapp. Bleibt als Fallback,