mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #1734] [MERGED] feat: allow a docs directory coming from env #7556
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/1734
Author: @darlanalves
Created: 4/24/2024
Status: ✅ Merged
Merged: 4/26/2024
Merged by: @tjbck
Base:
dev← Head:env-docs-dir📝 Commits (1)
89e8813feat: allow a docs directory coming from env📊 Changes
1 file changed (+2 additions, -2 deletions)
View changed files
📝
backend/config.py(+2 -2)📄 Description
Current config assumes /data/docs to be part of the current data directory.
Pull Request Checklist
Description
This allows DOCS_DIR to be mounted from a different path, outside of DATA_DIR, or falls back to the previous behaviour if DOCS_DIR is not in the environment.
A simple use case: the WebUI data is in a volume, but all docs are in a shared network volume, used by both Ollama and a file navigator to upload documents.
Alternatives explored:
Path.mkdirfails if called on a path to a symlink, even ifexists_ok=True.Changelog Entry
Added
DOCS_DIRto specify the full path for RAG documents.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.