diff --git a/Dockerfile b/Dockerfile new file mode 100644 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# Stage 1: Build +FROM node:alpine AS builder +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run build + +# Stage 2: Production +FROM node:alpine AS runner +WORKDIR /app +COPY --from=builder /app/.output ./.output +COPY --from=builder /app/package.json ./package.json + +EXPOSE 3000 +CMD ["node", ".output/server/index.mjs"] \ No newline at end of file