[PR #1734] [MERGED] feat: allow a docs directory coming from env #7556

Closed
opened 2025-11-11 17:29:59 -06:00 by GiteaMirror · 0 comments
Owner

📋 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: devHead: env-docs-dir


📝 Commits (1)

  • 89e8813 feat: 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: Briefly describe the changes in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?

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:

  • link the data folder to a shared mount: network mounts won't follow links
  • hard links: not possible for a directory
  • link a shared mount into /data/docs: Path.mkdir fails if called on a path to a symlink, even if exists_ok=True.
  • Subfolders inside /data/docs are ignored

Changelog Entry

Added

  • New environment variable DOCS_DIR to specify the full path for RAG documents.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/1734 **Author:** [@darlanalves](https://github.com/darlanalves) **Created:** 4/24/2024 **Status:** ✅ Merged **Merged:** 4/26/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `env-docs-dir` --- ### 📝 Commits (1) - [`89e8813`](https://github.com/open-webui/open-webui/commit/89e8813188bedb21dbb414fecd7fa0a8dff0b14d) feat: allow a docs directory coming from env ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `backend/config.py` (+2 -2) </details> ### 📄 Description Current config assumes /data/docs to be part of the current data directory. ## Pull Request Checklist - [ ] **Description:** Briefly describe the changes in this pull request. - [ ] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [ ] **Documentation:** Have you updated relevant documentation? - [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? --- ## 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: - link the data folder to a shared mount: network mounts won't follow links - hard links: not possible for a directory - link a shared mount into /data/docs: `Path.mkdir` fails if called on a path to a symlink, even if `exists_ok=True`. - Subfolders inside /data/docs are ignored --- ### Changelog Entry ### Added - New environment variable `DOCS_DIR` to specify the full path for RAG documents. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 17:29:59 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#7556