feat: configurable UI base path via BASE_PATH build arg #58

Merged
benvin merged 1 commits from benvin/ui-base-path into master 2026-06-26 23:50:18 +10:00
Owner

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.

  • Vite: base set from BASE_PATH env var at build time
  • React Router: basename set from injected __BASE_PATH__
  • Nginx: location block uses ${BASE_PATH}, substituted by sed at build
  • Dockerfile: ARG BASE_PATH=/ (default preserves existing behavior)
  • Woodpecker: passes BASE_PATH=/ui to docker-web build

Tested: assets serve at /ui/assets/..., SPA routing works at /ui/remotes, etc.

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. - Vite: `base` set from `BASE_PATH` env var at build time - React Router: `basename` set from injected `__BASE_PATH__` - Nginx: location block uses `${BASE_PATH}`, substituted by sed at build - Dockerfile: `ARG BASE_PATH=/` (default preserves existing behavior) - Woodpecker: passes `BASE_PATH=/ui` to docker-web build Tested: assets serve at `/ui/assets/...`, SPA routing works at `/ui/remotes`, etc.
unkinben added 1 commit 2026-06-26 23:45:26 +10:00
feat: configurable UI base path via BASE_PATH build arg
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
a68292c7e9
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
benvin merged commit ee6e581b9d into master 2026-06-26 23:50:18 +10:00
benvin deleted branch benvin/ui-base-path 2026-06-26 23:50:18 +10:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/artifactapi#58