Skip to content

fix(docker): build workspace dependencies before app images - #3537

Open
thiagosil wants to merge 1 commit into
trycompai:mainfrom
thiagosil:fix/docker-workspace-manifests
Open

fix(docker): build workspace dependencies before app images#3537
thiagosil wants to merge 1 commit into
trycompai:mainfrom
thiagosil:fix/docker-workspace-manifests

Conversation

@thiagosil

@thiagosil thiagosil commented Jul 29, 2026

Copy link
Copy Markdown

What does this PR do?

  • Updates the Docker build image to Bun 1.3.4 and provides a real Node.js 22 runtime for Prisma CLI commands.
  • Installs the complete app and portal workspace dependency manifests, including the local database package.
  • Builds transitive workspace dependencies before generating each application's Prisma client.
  • Copies the split Prisma schemas into the app and portal using their existing db:getschema scripts.

Issue: N/A — this fixes the Docker workspace build directly.

Visual Demo (For contributors especially)

N/A — infrastructure-only change with no UI impact.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox. N/A: no developer documentation change is required.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

No application secrets are required for build validation.

docker buildx build --progress=plain --target app --output=type=cacheonly .
docker buildx build --progress=plain --target portal --output=type=cacheonly .
git diff --check origin/main

Validated locally:

  • App production target builds successfully, including workspace dependencies, Prisma generation, Next.js compilation, TypeScript, static generation, and final image copies.
  • Portal production target builds successfully with the same coverage.
  • Migrator target builds and prisma validate succeeds against the packaged schema.
  • Shared build runtime reports Node v22.23.1 and Bun 1.3.4 with all Node shared libraries resolved.

Repository-wide checks currently have unrelated baseline failures outside this Dockerfile-only diff:

  • API typecheck: 22 existing errors in spec files.
  • App tests: 306 files / 2,253 tests pass; 39 files / 149 tests fail in unchanged application code.

Checklist

  • I have read the contributing guide.
  • My change follows the style guidelines of this project.
  • I have commented the non-obvious Node/Prisma runtime setup.
  • I have checked that the change introduces no new blocking warnings.

Summary by cubic

Fixes Docker workspace builds by compiling transitive workspace deps before building app images and running Prisma under a real Node.js 22 runtime. Ensures @trycompai/app and @trycompai/portal reliably generate schemas and clients and produce stable images.

  • Bug Fixes
    • Build workspace deps first via bunx turbo run build --filter='@trycompai/app^...' and --filter='@trycompai/portal^...' before Prisma generation.
    • Update to Bun 1.3.4 and add Node.js 22 so Prisma CLI runs under Node; migrator uses the same runtime.
    • Install full workspace manifests, including packages/db, and use each app’s db:getschema script to copy split Prisma schemas before generating @prisma/client.

Written for commit b8071ac. Summary will update on new commits.

Review in cubic

@CLAassistant

CLAassistant commented Jul 29, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

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.

2 participants