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