fix(docker): copy bun.lock and workspace node_modules to API runner stage

Bun workspace symlinks (apps/api/node_modules/*) pointed to root
.bun cache but were never copied from deps→runner. Added bun.lock,
apps/api/node_modules, and packages/shared/node_modules to the
runner COPY chain so  and  resolve at runtime.

Also added bun.lock to web Dockerfile for deterministic installs.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
MythEclipse
2026-06-15 03:30:18 +07:00
co-authored by Claude
parent 2d39468279
commit b93be6c6cb
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -1,7 +1,7 @@
FROM oven/bun:1.3.14 AS deps
WORKDIR /app
COPY package.json bunfig.toml tsconfig.base.json ./
COPY package.json bun.lock bunfig.toml tsconfig.base.json ./
COPY apps/api/package.json apps/api/package.json
COPY apps/web/package.json apps/web/package.json
COPY packages/shared/package.json packages/shared/package.json
@@ -13,6 +13,9 @@ ENV NODE_ENV=production
ENV API_PORT=3000
COPY --from=deps /app/node_modules ./node_modules
COPY --from=deps /app/apps/api/node_modules apps/api/node_modules
COPY --from=deps /app/packages/shared/node_modules packages/shared/node_modules
COPY --from=deps /app/bun.lock ./bun.lock
COPY package.json bunfig.toml tsconfig.base.json ./
COPY apps/api apps/api
COPY packages/shared packages/shared