Repository navigation
docs(subpath): show how to build a prefixed image for a release - #2296
Merged
Merged
Conversation
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
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. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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 todocs/SUBPATH.mdon building a prefixed image from a release tag instead.Verified on 1.3.0: the documented
git clone --depth 1 --branch 1.3.0plusdocker build -f Dockerfile.alpine --build-arg BASE_PATH=/libredbbuilds, and the container answers 200 on/libredb/api/db/health,/libredb/loginand its/libredb/_next/staticassets, 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 copiestests,e2e,docsandoperatordespite.dockerignore, and thenext buildtype 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.