Skip to content

Commit ea0b4d2

Browse files
authored
feat: add Dockerfile (#124)
1 parent a146ab1 commit ea0b4d2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Diff for: Dockerfile

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM node:20-alpine as build-stage
2+
3+
WORKDIR /app
4+
RUN corepack enable
5+
6+
COPY .npmrc package.json pnpm-lock.yaml ./
7+
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \
8+
pnpm install --frozen-lockfile
9+
10+
COPY . .
11+
RUN pnpm build
12+
13+
# SSR
14+
FROM node:20-alpine as production-stage
15+
16+
WORKDIR /app
17+
18+
COPY --from=build-stage /app/.output ./.output
19+
20+
EXPOSE 3000
21+
22+
CMD ["node", ".output/server/index.mjs"]

0 commit comments

Comments
 (0)