mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[PR #1701] [CLOSED] (feat) allow deployment under relative base path #36384
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/1701
Author: @behackl
Created: 4/23/2024
Status: ❌ Closed
Base:
dev← Head:feat-relative-base-path📝 Commits (3)
faa6415respect set base path within frontend8203a50respect WEBUI_BASE_PATH in manifest.json3510e8dadd build arg WEBUI_BASE_PATH to dockerfile📊 Changes
24 files changed (+88 additions, -60 deletions)
View changed files
📝
Dockerfile(+4 -1)📝
backend/config.py(+1 -0)📝
backend/main.py(+3 -2)📝
src/lib/components/chat/Settings/Chats.svelte(+3 -2)📝
src/lib/components/chat/ShareChatModal.svelte(+3 -2)📝
src/lib/components/layout/Sidebar.svelte(+12 -11)📝
src/lib/components/layout/Sidebar/ArchivedChatsModal.svelte(+2 -1)📝
src/lib/constants.ts(+2 -1)📝
src/routes/(app)/+layout.svelte(+4 -3)📝
src/routes/(app)/+page.svelte(+4 -3)📝
src/routes/(app)/admin/+page.svelte(+2 -1)📝
src/routes/(app)/c/[id]/+page.svelte(+7 -6)📝
src/routes/(app)/modelfiles/+page.svelte(+5 -4)📝
src/routes/(app)/modelfiles/create/+page.svelte(+2 -1)📝
src/routes/(app)/modelfiles/edit/+page.svelte(+3 -2)📝
src/routes/(app)/playground/+page.svelte(+2 -1)📝
src/routes/(app)/prompts/+page.svelte(+5 -4)📝
src/routes/(app)/prompts/create/+page.svelte(+2 -1)📝
src/routes/(app)/prompts/edit/+page.svelte(+4 -3)📝
src/routes/+layout.svelte(+5 -4)...and 4 more files
📄 Description
Pull Request Checklist
Description
This introduces some changes mainly to the frontend (plus the construction of
manifest.jsonin the backend) that allows setting a relative base path via the environment variable (or, in the context of the docker build process, the build argument)WEBUI_BASE_PATH.Please note: I am not familiar with svelte at all, and it feels like there might be a much simpler solution than what I did here -- however, I've used this branch to deploy a working instance behind a standard reverse proxy configuration (in this case Apache):
such that the interface is available at
https://original.example.com/chat.Related to #1162.
Unfortunately I won't have time to put much more effort towards this, maybe this can be useful to whoever comes up with a proper implementation of this feature eventually. :-)
Changelog Entry
Added
WEBUI_BASE_PATHwhich controls the relative base path used in the built frontend (plus inmanifest.json).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.