Skip to content

build(docker): take a prebuilt web dist - #119

Merged
ergofobe merged 1 commit into
mainfrom
server-image-prebuilt-web-dist
Sep 30, 2026
Merged

ergofobe merged 1 commit into
mainfrom
server-image-prebuilt-web-dist

Conversation

@ergofobe

Copy link
Copy Markdown
Owner

Why

The server image compiled packages/web during docker build. It now takes an already-built packages/web/dist and copies that bundle. packages/web stays in the repo and still builds on its own.

Scope

  • Dockerfile no longer runs the web build. It installs production dependencies and requires packages/web/dist/index.html.
  • .dockerignore lets that dist into the build context. Other dist trees stay out.
  • CI builds the web bundle, then builds the image.
  • docker-compose.yml notes the dist prerequisite.

Out of scope: moving the PWA, SDK changes, and any other issue.

Tradeoffs

A named Docker build context would also pass the dist in. Re-including packages/web/dist keeps docker build -t imogen . once the bundle exists, so compose does not grow a second context.

Blast Radius

An image build fails until packages/web/dist exists. CI builds that bundle first. The runtime still serves packages/web/dist. The web package source and its build script are unchanged.

Verification

On thor: bun run --filter '@imogen/web' build, then docker build --progress=plain -t imogen-server:prebuilt-dist-proof .. The build log does not run the UI compile. A marker file written only into the prebuilt dist is in the image at /app/packages/web/dist/PROOF_DIST_INPUT.txt.

The server image copies packages/web/dist and no longer compiles the UI.
packages/web stays in the repo and still builds on its own.
@ergofobe
ergofobe merged commit c8cb658 into main Sep 30, 2026
4 checks passed
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