add docker

This commit is contained in:
AmirHossein Mahmoodi
2025-04-30 13:40:58 +03:30
parent 242e8c198b
commit 0274875022
2 changed files with 29 additions and 0 deletions

6
.dockerignore Normal file
View File

@@ -0,0 +1,6 @@
node_modules
dist
npm-debug.log
Dockerfile
.dockerignore
.env

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:22-alpine
WORKDIR /app
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
EXPOSE 3023
CMD ["node", "dist/main"]