feat(deploy): support build-time subpath deployments - #662
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
I am developing kubernetes operator now, use rebease, upstream please, |
|
help-wanted @ducminhle |
cevheri
left a comment
There was a problem hiding this comment.
this is the big-one :) reviewing
Minor nits (non-blocking)Three small things found while verifying the subpath work. None is worth holding the PR for.
|
Closes #369.
Studio can now be built for a path such as
/tools/libredband served through a proxy that preserves that prefix. Previously, root-relative APIs, editor assets, redirects and cookies broke deployments on a shared domain.BASE_PATHat build time and bake it into Next routing and a shared helper for browser requests, native navigation, metadata and Monaco. Keep Next Link/router paths app-relative so they are prefixed once./tools/libredbafter logout.config.basePathprefixes the three default health probes while preserving custom probes. Bump chart 0.1.61 to 0.1.62 (app 0.15.0) and mirror it into the operator.docs/SUBPATH.md; retire backlog N3. Add a production browser test to CI through a path-routing proxy that returns 404 outside the mount.The branch includes upstream 0.15.0. Its catalog-layout error now retains the original error cause, correcting upstream lint and formatting failures; all 77 catalog regression tests pass.
Validation:
bun run test: 14,637 passed, zero failed; all 34 isolated component groups passed.bun run test:coverage && bun run coverage:check: 46,218/46,218 source lines, 100.00%./~/libredbthrough the proxy: login, actual SQLite employee-count query, API calls, self-hosted Monaco, native admin links, server redirects, RBAC, cookie deletion and cross-origin write rejection. No failed app requests or page errors.--build-arg BASE_PATH=/tools/libredb, without a runtimeBASE_PATH; the same browser/query flow passed through the proxy. Default root deployment also passed the auth/editor/API/admin/logout browser flow.Next.js fixes
basePathat build time. The published root image cannot be relocated by a runtime environment variable; operators must rebuild a custom image and preserve the prefix at their proxy. The chart value configures probe paths, not runtime app routing.