Today Docker and Systemd already have ways of mimicking what dotenv does, but for anything that runs under it. It's a detail.
Unhardcode some paths
I am trying to Nix it. This PR started as I being lazy to patch stuff up to work with my requisites lol.
Even though one can customize some extra values, like the data directory, the defaults are still the same.
I tested the backend using a virtualenv environment to see if it finds stuff and works. I need to test if the ollama integration properly works.
🔄 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/536
**Author:** [@lucasew](https://github.com/lucasew)
**Created:** 1/19/2024
**Status:** ✅ Merged
**Merged:** 1/25/2024
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `main` ← **Head:** `backend-data-dir`
---
### 📝 Commits (5)
- [`e3503d6`](https://github.com/open-webui/open-webui/commit/e3503d66173bd6b9f89e3054a7e7ac4f2bde91df) backend: make dotenv optional
- [`5b26d2a`](https://github.com/open-webui/open-webui/commit/5b26d2a686d47822d5959e90a1d0b64ebec88d67) backend: make the data directory and the artifacts from the frontend customizable using environment variables
- [`d2c5f3d`](https://github.com/open-webui/open-webui/commit/d2c5f3d59164137e047f2d93f207b6f8f7a44cd3) refac: convert str var to f-string
- [`8da06f5`](https://github.com/open-webui/open-webui/commit/8da06f5e743c33389c6d24748147fbd262f40733) fixes after the refactor
- [`326af5a`](https://github.com/open-webui/open-webui/commit/326af5a648c21a6833e8b3d80aaef7ff3f5bfd8b) refac
### 📊 Changes
**4 files changed** (+30 additions, -23 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/apps/web/internal/db.py` (+3 -1)
📝 `backend/apps/web/routers/utils.py` (+3 -5)
📝 `backend/config.py` (+18 -15)
📝 `backend/main.py` (+6 -2)
</details>
### 📄 Description
- Why dotenv as optional dependency is useful?
Today Docker and Systemd already have ways of mimicking what dotenv does, but for anything that runs under it. It's a detail.
- Unhardcode some paths
I am trying to Nix it. This PR started as I being lazy to patch stuff up to work with my requisites lol.
Even though one can customize some extra values, like the data directory, the defaults are still the same.
I tested the backend using a virtualenv environment to see if it finds stuff and works. I need to test if the ollama integration properly works.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/536
Author: @lucasew
Created: 1/19/2024
Status: ✅ Merged
Merged: 1/25/2024
Merged by: @tjbck
Base:
main← Head:backend-data-dir📝 Commits (5)
e3503d6backend: make dotenv optional5b26d2abackend: make the data directory and the artifacts from the frontend customizable using environment variablesd2c5f3drefac: convert str var to f-string8da06f5fixes after the refactor326af5arefac📊 Changes
4 files changed (+30 additions, -23 deletions)
View changed files
📝
backend/apps/web/internal/db.py(+3 -1)📝
backend/apps/web/routers/utils.py(+3 -5)📝
backend/config.py(+18 -15)📝
backend/main.py(+6 -2)📄 Description
Today Docker and Systemd already have ways of mimicking what dotenv does, but for anything that runs under it. It's a detail.
I am trying to Nix it. This PR started as I being lazy to patch stuff up to work with my requisites lol.
Even though one can customize some extra values, like the data directory, the defaults are still the same.
I tested the backend using a virtualenv environment to see if it finds stuff and works. I need to test if the ollama integration properly works.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.