Skip to content

Commit 4ea039a

Browse files
committed
update docker file
1 parent 3c096bc commit 4ea039a

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

.dockerignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*.log
2+
*.md
3+
*.tsbuildinfo
4+
.dockerignore
5+
.env
6+
.git
7+
.github
8+
.gitignore
9+
Dockerfile
10+
example.env
11+
LICENSE
12+
node_modules
13+
npm-debug.log

Dockerfile

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1-
FROM node:24
1+
FROM node:24-slim AS builder
22

33
WORKDIR /app
44

55
COPY package*.json ./
6-
RUN npm install
7-
COPY . .
6+
RUN npm ci
87

9-
EXPOSE 80
8+
COPY tsconfig.json ./
9+
COPY src ./src
1010

11-
CMD npm start
11+
RUN npx tsc
12+
13+
FROM node:24-slim
14+
15+
WORKDIR /app
16+
17+
COPY package*.json ./
18+
RUN npm ci --production
19+
20+
COPY --from=builder /app/dist ./dist
21+
COPY views ./views
22+
23+
EXPOSE ${port:-80}
24+
25+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)