Skip to content

docs(subpath): show how to build a prefixed image for a release - #2296

Merged
cevheri merged 2 commits into
mainfrom
docs/subpath-release-image-369
Nov 15, 2026
Merged

cevheri merged 2 commits into
mainfrom
docs/subpath-release-image-369

Conversation

@cevheri

@cevheri cevheri commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Refs #369.

A user asked for a published image built with BASE_PATH=/libredb. The prefix is fixed at build time, so a published variant would serve one path only. This adds a section to docs/SUBPATH.md on building a prefixed image from a release tag instead.

Verified on 1.3.0: the documented git clone --depth 1 --branch 1.3.0 plus docker build -f Dockerfile.alpine --build-arg BASE_PATH=/libredb builds, and the container answers 200 on /libredb/api/db/health, /libredb/login and its /libredb/_next/static assets, 404 on the root paths, and signs in with a cookie scoped to /libredb.

The section also warns against a remote Git context (docker build <url>#1.3.0): it copies tests, e2e, docs and operator despite .dockerignore, and the next build type check ran out of Node heap.

It also adds "Why a prebuilt image cannot take the prefix at runtime": Next.js compiles the prefix into the client router, the chunk loader and prerendered pages, and Studio does not rewrite compiled output to relocate an image. A placeholder-rewrite probe on 1.3.0 failed silently on one prerendered page, which the base-path E2E suite did not catch.

No prefixed image is published, since the prefix is fixed at build time.
Document building one from a release tag checkout, and warn that a remote
Git context skips .dockerignore and runs out of heap on 1.3.0.

Refs #369
… runtime

Record why Studio does not rewrite compiled output to relocate an image,
with the failure a 1.3.0 probe hit, so the idea is not re-researched.

Refs #369
@cevheri

cevheri commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

@ducminhle @SyedMuhamadYasir @del000, tagging you from #369 since this touches your deployments and #662. This PR documents building a prefixed image from a release tag, and records why a prebuilt image cannot take the prefix at runtime: Next.js compiles it into the client router, the chunk loader and prerendered pages, and rewriting that output at start was a silent failure in our probe. If your setup needs something these docs do not cover, or you see a cleaner supported approach, please say so here before this merges.

@sonarqubecloud

Copy link
Copy Markdown

@cevheri
cevheri merged commit df3d1d0 into main Nov 15, 2026
29 checks passed
@cevheri
cevheri deleted the docs/subpath-release-image-369 branch November 15, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant