Skip to content

Commit 36f8102

Browse files
feat: add docker
1 parent 29c4b63 commit 36f8102

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Dockerfile

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM node:20-alpine as base
2+
3+
FROM base as builder
4+
5+
WORKDIR /usr/src/app
6+
7+
COPY package.json pnpm-lock.yaml ./
8+
RUN npm install -g pnpm
9+
RUN pnpm install --frozen-lockfile
10+
11+
COPY . .
12+
RUN pnpm build
13+
14+
FROM base as runner
15+
16+
WORKDIR /usr/src/app
17+
18+
COPY --from=builder /usr/src/app/dist ./dist
19+
COPY --from=builder /usr/src/app/node_modules ./node_modules
20+
COPY --from=builder /usr/src/app/package.json ./package.json
21+
22+
CMD ["node", "dist/main.js"]

0 commit comments

Comments
 (0)