dockerise for push

This commit is contained in:
Parsa Nazer
2024-12-25 22:50:10 +03:30
parent 522583f876
commit 09e8ceb7da
6 changed files with 136 additions and 20 deletions
+13
View File
@@ -0,0 +1,13 @@
FROM node:20-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:20-alpine as production-stage
WORKDIR /app
COPY --from=build-stage /app /app
EXPOSE 3000
ENV NODE_ENV=production
CMD ["npm", "run", "start"]