diff --git a/Dockerfile b/Dockerfile index 155cd19..5177c04 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,19 @@ -FROM node:16-alpine +FROM node:16-alpine as builder WORKDIR /app - COPY . . - RUN npm install -g pnpm - RUN pnpm install --frozen-lockfile - RUN npm run build -EXPOSE 3000 +FROM node:16-alpine as runner +WORKDIR /app +ENV NODE_ENV production +COPY . . +RUN npm install -g pnpm +RUN pnpm install --frozen-lockfile -P +COPY --from=builder /app/dist ./dist + +EXPOSE 3000 CMD ["npm", "start"] \ No newline at end of file