feat: configurable UI base path via BASE_PATH build arg #58
Reference in New Issue
Block a user
Delete Branch "benvin/ui-base-path"
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?
Serves the UI under /ui instead of /. This pairs with the argocd route simplification (argocd-apps#201) where /ui → UI service and everything else → API.
baseset fromBASE_PATHenv var at build timebasenameset from injected__BASE_PATH__${BASE_PATH}, substituted by sed at buildARG BASE_PATH=/(default preserves existing behavior)BASE_PATH=/uito docker-web buildTested: assets serve at
/ui/assets/..., SPA routing works at/ui/remotes, etc.Allows serving the UI under a subpath (e.g. /ui) instead of root. - Vite config reads BASE_PATH env var, sets it as the asset base and injects __BASE_PATH__ for runtime use - React Router uses basename from __BASE_PATH__ for client-side routing - Nginx config uses ${BASE_PATH} placeholder, replaced at build time - Dockerfile accepts BASE_PATH build arg (default: /) - Woodpecker docker pipeline passes BASE_PATH=/ui