From 75d9d18e0dca71e3e1d02658d4484d8f0e507eff Mon Sep 17 00:00:00 2001 From: Wuesteon Date: Mon, 8 Dec 2025 19:24:52 +0100 Subject: [PATCH] fix(web): copy node_modules from builder instead of npm install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit npm doesn't understand pnpm's workspace:* protocol. Copy node_modules from the builder stage to get all dependencies including workspace packages. Affected: todo, manacore, chat, calendar, clock web apps. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- apps/calendar/apps/web/Dockerfile | 6 ++---- apps/chat/apps/web/Dockerfile | 6 ++---- apps/clock/apps/web/Dockerfile | 6 ++---- apps/manacore/apps/web/Dockerfile | 6 ++---- apps/todo/apps/web/Dockerfile | 6 ++---- 5 files changed, 10 insertions(+), 20 deletions(-) diff --git a/apps/calendar/apps/web/Dockerfile b/apps/calendar/apps/web/Dockerfile index 29581cae3..ed87318e7 100644 --- a/apps/calendar/apps/web/Dockerfile +++ b/apps/calendar/apps/web/Dockerfile @@ -57,12 +57,10 @@ FROM node:20-alpine AS production WORKDIR /app -# Copy built application +# Copy built application and node_modules from builder COPY --from=builder /app/apps/calendar/apps/web/build ./build COPY --from=builder /app/apps/calendar/apps/web/package.json ./ - -# Install only production dependencies for the built app -RUN npm install --omit=dev +COPY --from=builder /app/apps/calendar/apps/web/node_modules ./node_modules # Expose port EXPOSE 5186 diff --git a/apps/chat/apps/web/Dockerfile b/apps/chat/apps/web/Dockerfile index b722cb801..f4bf298fc 100644 --- a/apps/chat/apps/web/Dockerfile +++ b/apps/chat/apps/web/Dockerfile @@ -57,12 +57,10 @@ FROM node:20-alpine AS production WORKDIR /app -# Copy built application +# Copy built application and node_modules from builder COPY --from=builder /app/apps/chat/apps/web/build ./build COPY --from=builder /app/apps/chat/apps/web/package.json ./ - -# Install only production dependencies for the built app -RUN npm install --omit=dev +COPY --from=builder /app/apps/chat/apps/web/node_modules ./node_modules # Expose port EXPOSE 3000 diff --git a/apps/clock/apps/web/Dockerfile b/apps/clock/apps/web/Dockerfile index c3782396a..06b4bc901 100644 --- a/apps/clock/apps/web/Dockerfile +++ b/apps/clock/apps/web/Dockerfile @@ -57,12 +57,10 @@ FROM node:20-alpine AS production WORKDIR /app -# Copy built application +# Copy built application and node_modules from builder COPY --from=builder /app/apps/clock/apps/web/build ./build COPY --from=builder /app/apps/clock/apps/web/package.json ./ - -# Install only production dependencies for the built app -RUN npm install --omit=dev +COPY --from=builder /app/apps/clock/apps/web/node_modules ./node_modules # Expose port EXPOSE 5187 diff --git a/apps/manacore/apps/web/Dockerfile b/apps/manacore/apps/web/Dockerfile index 44b494c1b..f34e22bc1 100644 --- a/apps/manacore/apps/web/Dockerfile +++ b/apps/manacore/apps/web/Dockerfile @@ -58,12 +58,10 @@ FROM node:20-alpine AS production WORKDIR /app -# Copy built application +# Copy built application and node_modules from builder COPY --from=builder /app/apps/manacore/apps/web/build ./build COPY --from=builder /app/apps/manacore/apps/web/package.json ./ - -# Install only production dependencies for the built app -RUN npm install --omit=dev +COPY --from=builder /app/apps/manacore/apps/web/node_modules ./node_modules # Expose port EXPOSE 5173 diff --git a/apps/todo/apps/web/Dockerfile b/apps/todo/apps/web/Dockerfile index c041715e2..93ec5e7ee 100644 --- a/apps/todo/apps/web/Dockerfile +++ b/apps/todo/apps/web/Dockerfile @@ -57,12 +57,10 @@ FROM node:20-alpine AS production WORKDIR /app -# Copy built application +# Copy built application and node_modules from builder COPY --from=builder /app/apps/todo/apps/web/build ./build COPY --from=builder /app/apps/todo/apps/web/package.json ./ - -# Install only production dependencies for the built app -RUN npm install --omit=dev +COPY --from=builder /app/apps/todo/apps/web/node_modules ./node_modules # Expose port EXPOSE 5188