add Dockerfile

main
SavelyG 2025-02-05 14:17:19 +00:00
parent eeb8f411ac
commit 8ae5e9d7b8
2 changed files with 36 additions and 0 deletions

11
.dockerignore Normal file
View File

@ -0,0 +1,11 @@
node_modules
dist
test
.devcontainer
*.log
.git
*.md
Dockerfile
.dockerignore
.gitignore
.prettier*

25
Dockerfile Normal file
View File

@ -0,0 +1,25 @@
FROM node:23 as builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:23-slim
WORKDIR /app
COPY package*.json ./
RUN npm install --only=production
COPY --from=builder /app/dist ./dist
EXPOSE 3000
CMD ["npm", "run", "start:prod"]