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:
+4
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
FROM oven/bun:1.3.14 AS builder
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json bunfig.toml tsconfig.base.json ./
|
||||
COPY package.json bun.lock bunfig.toml tsconfig.base.json ./
|
||||
COPY packages/shared/package.json packages/shared/package.json
|
||||
COPY apps/web/package.json apps/web/package.json
|
||||
COPY apps/api/package.json apps/api/package.json
|
||||
|
||||
Reference in New Issue
Block a user