diff --git a/backend/Dockerfile b/backend/Dockerfile index 540e751..0fa9c99 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,5 +1,4 @@ -# Stage 1: Builder -FROM node:20-alpine3.17 AS builder +FROM node:20-alpine3.17 # Install pnpm globally RUN npm install -g pnpm @@ -13,23 +12,11 @@ COPY common ./common COPY backend ./backend # Install dependencies for all workspaces, including backend -RUN pnpm install +RUN pnpm install --filter backend... # Build the backend RUN pnpm --filter backend build -# Stage 2: Runner -FROM node:20-alpine3.17 AS runner - -WORKDIR /app - -COPY --from=builder /app/package.json ./package.json -COPY --from=builder /app/backend/dist ./dist -COPY --from=builder /app/backend/package.json ./backend/package.json - -# Install production dependencies -RUN npm install -g pnpm && pnpm install --prod - # Expose the port your application runs on EXPOSE 8080