docker added
This commit is contained in:
7
.dockerignore
Normal file
7
.dockerignore
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
node_modules
|
||||||
|
npm-debug.log
|
||||||
|
Dockerfile
|
||||||
|
.dockerignore
|
||||||
|
.git
|
||||||
|
.env
|
||||||
|
dist
|
||||||
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
FROM node:20-alpine
|
||||||
|
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm ci --omit=dev
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# اگر TypeScript داری و build لازم است، این دو خط را فعال کن:
|
||||||
|
# RUN npm run build
|
||||||
|
# سپس CMD را ببر روی dist
|
||||||
|
|
||||||
|
EXPOSE 4000
|
||||||
|
CMD ["npm","start"]
|
||||||
Reference in New Issue
Block a user