Skip to content

Commit 85f78ca

Browse files
committed
fix(server): copy nested node_modules and force dev dependencies in Docker build
1 parent 7a455fd commit 85f78ca

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

apps/server/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ RUN turbo prune @nota/server --docker
2020
FROM base AS deps
2121
WORKDIR /app
2222
COPY --from=pruner /app/out/json/ .
23-
RUN bun install --frozen-lockfile
23+
RUN NODE_ENV=development bun install --frozen-lockfile
2424

2525
# ---------------------------------------------------------
2626
# Stage 3: Build application bundle
2727
# ---------------------------------------------------------
2828
FROM base AS builder
2929
WORKDIR /app
30-
COPY --from=deps /app/node_modules ./node_modules
30+
COPY --from=deps /app .
3131
COPY --from=pruner /app/out/full/ .
3232

3333
ENV NODE_ENV=production
@@ -52,9 +52,8 @@ ENV NODE_ENV=production
5252
ENV PORT=3000
5353

5454
# Copy production node_modules and built dist
55-
COPY --from=prod-deps --chown=bun:bun /app/node_modules ./node_modules
55+
COPY --from=prod-deps --chown=bun:bun /app .
5656
COPY --from=builder --chown=bun:bun /app/apps/server/dist ./apps/server/dist
57-
COPY --from=pruner --chown=bun:bun /app/out/json/apps/server/package.json ./apps/server/package.json
5857

5958
# Security: run as non-root user
6059
USER bun

0 commit comments

Comments
 (0)