From 522c09c32cb451b9995c0485b636e3db20829ce7 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 4 Oct 2024 22:57:10 +0100 Subject: [PATCH] yes? --- backend/Dockerfile | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) 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