Repository navigation
perf(templates): prune Docker builds and ship production-only runtimes - #1307
AmanVarshney01 wants to merge 1 commit into
Conversation
…tion-only runtimes - Each Dockerfile prunes the workspace to its app with turbo prune --docker, installs from the pruned manifests with a frozen lockfile, then copies sources, so source edits no longer invalidate the dependency install layer - Generate the Prisma client inside the image instead of relying on the host - Runtime images get a production-only install; Next standalone, Nuxt and Solid (self-contained bundles) get only the Varlock CLI - Move @tanstack/react-query-devtools to dependencies: React Router SSR imports it at runtime - Document the lockfile requirement in the Docker guide and generated README
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. WalkthroughDocker image templates now prune workspaces before installing and building. They use shared package-manager steps and define production dependency and runtime stages for server and web applications. The Docker guide and generated deployment instructions describe the updated flow. ChangesDocker Image Generation
Merge Risk:
|
Summary
Smaller Docker images and faster rebuilds for generated apps.
turbo prune <app> --dockerin every Dockerfile: the build installs only the target app's workspace packages from the pruned manifests with a frozen lockfile (bun install --frozen-lockfile/pnpm install --frozen-lockfile/npm ci), then copies sources. Source edits no longer invalidate the dependency install layer. Works without the Turborepo add-on (noturbo.jsonneeded); it does need a lockfile.--prod --ignore-scriptsinstall for runtimes that importnode_modules(servers, TanStack Start, React Router, SvelteKit, Astro).db:generate.@tanstack/react-query-devtoolsmoved todependencies: the React Router SSR bundle imports it at runtime (found when the runtime stopped shipping dev dependencies).dockerPrune,dockerInstall,dockerProdInstall,dockerVarlockCli,dockerPrismaGenerate) replace the install block that was copied into 9 Dockerfiles.Image sizes (local, linux/arm64)
Verification
docker compose up --build --wait, then sign-up, sign-in and get-session. All runtimes run asnode/bun.privateDatareturns the user with a session and 401 without one; headless browser adds a todo on/todos, it is still there after reload, and the signed-in/dashboardshows the user. 96/96 checks pass, no page errors.CACHED; only the source copy and build re-run.bun run checkclean;apps/clitest:ci112 pass.Not covered
node_modulesbecause tsdown keeps third-party deps external.