Problem
After switching the in-repo app deploys to serve on Bun (#522), the ui-website component detail pages 500'd in production (ResolveMessage: Cannot find module '../../../../components/ui/accordion.ts'). Root cause: the components/ui/*.ts files those pages import are GENERATED at the ui-website npm prestart hook (node scripts/copy-registry.js), not baked into the deploy image. The Dockerfile bakes Tailwind css at build time but NOT the registry copy, so any start path that bypasses npm run start (the direct bun webjs.js start) is missing the files. The home pages worked (they do not import the generated files), which is why a home-route-only smoke check missed it.
Design / approach
Bake the registry copy into the Dockerfile at build time, next to the existing Tailwind step (copy-registry.js is pure filesystem, no runtime/network/DB deps, so it is build-safe). Then the generated components/ui/ ships in the image and EVERY start path (npm, direct bun, compose) resolves them, matching the Dockerfile's existing "bake static assets at build" pattern. Runtime-only prestart steps (the blog's prisma migrate deploy, which needs the DB volume) stay in the start command. Also harden the four-app dogfood smoke to probe a registry-backed ui-website route, not just the home page, so this class of bug fails the check.
Acceptance criteria
Problem
After switching the in-repo app deploys to serve on Bun (#522), the ui-website component detail pages 500'd in production (
ResolveMessage: Cannot find module '../../../../components/ui/accordion.ts'). Root cause: thecomponents/ui/*.tsfiles those pages import are GENERATED at the ui-website npmprestarthook (node scripts/copy-registry.js), not baked into the deploy image. The Dockerfile bakes Tailwind css at build time but NOT the registry copy, so any start path that bypassesnpm run start(the directbun webjs.js start) is missing the files. The home pages worked (they do not import the generated files), which is why a home-route-only smoke check missed it.Design / approach
Bake the registry copy into the Dockerfile at build time, next to the existing Tailwind step (
copy-registry.jsis pure filesystem, no runtime/network/DB deps, so it is build-safe). Then the generatedcomponents/ui/ships in the image and EVERY start path (npm, direct bun, compose) resolves them, matching the Dockerfile's existing "bake static assets at build" pattern. Runtime-only prestart steps (the blog'sprisma migrate deploy, which needs the DB volume) stay in the start command. Also harden the four-app dogfood smoke to probe a registry-backed ui-website route, not just the home page, so this class of bug fails the check.Acceptance criteria
docker compose upserves ui-website component DETAIL pages (e.g. /docs/components/progress), not just the home page, on Bun.