docker compose file and dockerfile

This commit is contained in:
Parsa Nazer
2024-12-05 14:32:06 +03:30
parent 5c136874e1
commit fe91fb6b1c
3 changed files with 66 additions and 0 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"]