From 7ffb4a598aac919b672b6555d34f6fcb2e99d5cd Mon Sep 17 00:00:00 2001 From: gyurix Date: Thu, 16 Jul 2026 15:08:13 +0200 Subject: [PATCH] feat(openwebui): add web search config and pipelines secret - Introduce `PIPELINES_API_KEY` in the secrets file to secure pipelines communication - Replace hardcoded RAG and web search URLs with template variables, enabling flexible configuration - Add new template variables (`ENABLE_WEB_SEARCH`, `WEB_SEARCH_ENGINE`, `WEB_LOADER_ENGINE`, `SEARXNG_QUERY_URL`, `EXTERNAL_WEB_LOADER_URL`) with defaults - Include OpenWebUI secret env file in the service definition for consistent secret injection - Set `ENABLE_PERSISTENT_CONFIG` to false to align with the parametrized deployment approach These changes decouple service endpoints from the deployment template, allowing users to easily customize web search and RAG integrations without modifying service definitions. --- openwebui/openwebui-secret.json | 3 +++ openwebui/service-openwebui.json | 23 +++++++++++--------- openwebui/template.json | 37 +++++++++++++++++++++++++++++++- 3 files changed, 52 insertions(+), 11 deletions(-) diff --git a/openwebui/openwebui-secret.json b/openwebui/openwebui-secret.json index 8d83bf7..f41de64 100644 --- a/openwebui/openwebui-secret.json +++ b/openwebui/openwebui-secret.json @@ -5,6 +5,9 @@ "POSTGRES_PASSWORD": "#POSTGRES_PASSWORD", "POSTGRES_ROOT_PASSWORD": "#POSTGRES_ROOT_PASSWORD" }, + "openwebuipipelines": { + "PIPELINES_API_KEY": "#PIPELINES_API_KEY" + }, "openwebuisearxng": { "SEARXNG_SECRET": "#SEARXNG_SECRET" }, diff --git a/openwebui/service-openwebui.json b/openwebui/service-openwebui.json index ff3e4ca..c1e8eb1 100644 --- a/openwebui/service-openwebui.json +++ b/openwebui/service-openwebui.json @@ -130,6 +130,9 @@ "QDRANT_URI": "http://openwebuiqdrant-app:6333" } ], + "ENV_FILES": [ + "/etc/user/secret/openwebui/openwebui.json" + ], "EXTRA": "--restart always", "DEPEND": [], "START_ON_BOOT": "false", @@ -221,32 +224,32 @@ } ], "ENVS": [ + { + "ENABLE_PERSISTENT_CONFIG": "false" + }, { "OPENAI_API_BASE_URL": "#OPENAI_API_BASE_URL" }, { "VECTOR_DB": "qdrant" }, - { - "QDRANT_HOST": "openwebuiqdrant-app" - }, - { - "QDRANT_PORT": "6333" - }, { "QDRANT_URI": "http://openwebuiqdrant-app:6333" }, { - "ENABLE_RAG_PIPELINE": "True" + "ENABLE_WEB_SEARCH": "#ENABLE_WEB_SEARCH" }, { - "RAG_PIPELINE_URL": "http://openwebuipipelines-app:9099/v1" + "WEB_SEARCH_ENGINE": "#WEB_SEARCH_ENGINE" }, { - "WEB_SEARCH_ENGINE": "http://openwebuisearxng-app:8080/search?q=" + "WEB_LOADER_ENGINE": "#WEB_LOADER_ENGINE" }, { - "EXTERNAL_WEB_LOADER_URL": "http://openwebuicrawl4ai-app:11235" + "SEARXNG_QUERY_URL": "#SEARXNG_QUERY_URL" + }, + { + "EXTERNAL_WEB_LOADER_URL": "#EXTERNAL_WEB_LOADER_URL" } ], "ENV_FILES": [ diff --git a/openwebui/template.json b/openwebui/template.json index 10271f4..d82d3e8 100644 --- a/openwebui/template.json +++ b/openwebui/template.json @@ -103,6 +103,41 @@ "value": "", "required": "true", "generated": "random|sha256|20" - } + }, + { + "description": "Enable web search", + "key": "ENABLE_WEB_SEARCH", + "value": "true", + "info": "Optional web search enabling, keep it empty if you don't want it", + "advanced": "true" + }, + { + "description": "Web search engine", + "key": "WEB_SEARCH_ENGINE", + "value": "searxng", + "info": "Optional web search engine Searxng, keep it empty if you don't want it or define any other if you have", + "advanced": "true" + }, + { + "description": "External web search engine", + "key": "WEB_LOADER_ENGINE", + "value": "external", + "info": "If optional web search engine defined, keep it as is, otherwise keep it empty", + "advanced": "true" + }, + { + "description": "Web", + "key": "SEARXNG_QUERY_URL", + "value": "http://openwebuisearxng-app:8080/search?q=", + "info": "Optional web search engine Searxng, keep it empty if you don't want it", + "advanced": "true" + }, + { + "description": "External web search engine", + "key": "EXTERNAL_WEB_LOADER_URL", + "value": "http://openwebuicrawl4ai-app:11235", + "info": "Optional crawl4ai application url, keep it as is, otherwise keep it empty", + "advanced": "true" + } ] } \ No newline at end of file