fix(docker): make the web image build and produce a working self-host SPA - #365
Open
tlvenn wants to merge 1 commit into
Open
fix(docker): make the web image build and produce a working self-host SPA#365tlvenn wants to merge 1 commit into
tlvenn wants to merge 1 commit into
Conversation
… SPA - Declare @maple-dev/browser in apps/web — it is imported by apps/web/src but resolved only via workspace hoisting, so turbo prune --docker omits packages/browser and the image build fails at its dist build step. - Build lib/clickhouse-builder before the web bundle — @maple/query-engine imports its dist/ subpath exports; without it vite fails to resolve @maple-dev/clickhouse-builder/sql. - Add VITE_ELECTRIC_SYNC_URL build arg — Electric shapes are the only read path for dashboards/alerts/error lists and the URL is baked at build time, so a Docker-built SPA needs a way to set it.
tlvenn
force-pushed
the
fix-web-docker-build
branch
from
August 8, 2026 04:29
bbc41c1 to
2f6b286
Compare
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.
First slice of the fixes offered in #352 — the smallest set that makes
apps/web/Dockerfilebuild from a clean checkout and produce a usable self-host image:@maple-dev/browserinapps/web— it's imported byapps/web/src(session replay +main.tsx) but was never inpackage.json, so it only resolved via workspace hoisting.turbo prune @maple/web --dockertherefore omitspackages/browserfrom the pruned tree and the image build fails atbun run --cwd packages/browser build(ENOENT). Declaring the dependency fixes prune and is honest about the real dependency graph. (bun.lockdelta is the one matching line.)lib/clickhouse-builderbefore the web bundle —@maple/query-engineimports@maple-dev/clickhouse-builder/sqland/expr, which aredist/subpath exports; without building it first, vite fails withRolldown failed to resolve import "@maple-dev/clickhouse-builder/sql".VITE_ELECTRIC_SYNC_URLas a build arg — Electric shapes are the only read path for dashboards/alerts/error-issue lists, and the URL is baked at build time (apps/web/src/lib/services/common/electric-sync-url.ts), so a Docker-built SPA needs a way to set it. Defaults unchanged when unset.Verified by building the image from a clean checkout of
mainand serving it (we run this image in our self-hosted deployment). Happy to follow up with the api Dockerfile / compose cleanup once you've said whether you'd rather fix or remove those (#352).Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.