Priority: P1
Source
Senior Architect Code Review (2026-04-03)
Problem
The API and dashboard production Dockerfiles use COPY --from=build /app /app which copies the entire workspace into the runner stage — including node_modules, all source files, build artifacts, and test files. This results in unnecessarily large production images (potentially hundreds of MB of dead weight).
Affected Files
apps/api/Dockerfile
apps/dashboard/Dockerfile
Current Pattern
# API Dockerfile - runner stage
FROM docker.io/oven/bun:1.3.11 AS runner
WORKDIR /app
COPY --from=build /app /app # <-- copies EVERYTHING
Recommendation
API: Copy only the runtime files needed:
apps/api/src/ (Bun runs TypeScript directly)
packages/shared-types/src/
node_modules/ (or better, use bun install --production)
package.json files
Dashboard: The dashboard builds to static assets. The runner should:
- Copy only
apps/dashboard/dist/ and apps/dashboard/server.ts
- Install only production dependencies
- Serve the static build via the Express server
Acceptance Criteria
Priority: P1
Source
Senior Architect Code Review (2026-04-03)
Problem
The API and dashboard production Dockerfiles use
COPY --from=build /app /appwhich copies the entire workspace into the runner stage — includingnode_modules, all source files, build artifacts, and test files. This results in unnecessarily large production images (potentially hundreds of MB of dead weight).Affected Files
apps/api/Dockerfileapps/dashboard/DockerfileCurrent Pattern
Recommendation
API: Copy only the runtime files needed:
apps/api/src/(Bun runs TypeScript directly)packages/shared-types/src/node_modules/(or better, usebun install --production)package.jsonfilesDashboard: The dashboard builds to static assets. The runner should:
apps/dashboard/dist/andapps/dashboard/server.tsAcceptance Criteria
--productiondependency installation where possible