fix(web): copy node_modules from builder instead of npm install

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 <noreply@anthropic.com>
This commit is contained in:
Wuesteon 2025-12-08 19:24:52 +01:00
parent ef44c065f9
commit 75d9d18e0d
5 changed files with 10 additions and 20 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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