mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
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:
parent
ef44c065f9
commit
75d9d18e0d
5 changed files with 10 additions and 20 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue