mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
backend: make the data directory and the artifacts from the frontend customizable using environment variables
Signed-off-by: lucasew <lucas59356@gmail.com>
This commit is contained in:
@@ -14,7 +14,7 @@ from apps.openai.main import app as openai_app
|
||||
from apps.web.main import app as webui_app
|
||||
from apps.rag.main import app as rag_app
|
||||
|
||||
from config import ENV
|
||||
from config import ENV, WEB_DIR
|
||||
|
||||
|
||||
class SPAStaticFiles(StaticFiles):
|
||||
@@ -58,4 +58,4 @@ app.mount("/openai/api", openai_app)
|
||||
app.mount("/rag/api/v1", rag_app)
|
||||
|
||||
|
||||
app.mount("/", SPAStaticFiles(directory="../build", html=True), name="spa-static-files")
|
||||
app.mount("/", SPAStaticFiles(directory=str(WEB_DIR), html=True), name="spa-static-files")
|
||||
|
||||
Reference in New Issue
Block a user