Skip to content

Commit 3ea3e45

Browse files
committed
build: docker file
1 parent 0635508 commit 3ea3e45

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
.output
3+
.nuxt
4+
README.md

Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM node:20-alpine as build
2+
3+
RUN corepack enable
4+
5+
RUN corepack prepare pnpm@latest --activate
6+
7+
WORKDIR /app
8+
9+
COPY package.json /app
10+
11+
RUN pnpm install
12+
13+
COPY . /app
14+
15+
RUN pnpm run build
16+
17+
FROM gcr.io/distroless/nodejs20 as prod
18+
19+
WORKDIR /app
20+
21+
COPY --from=build /app/.output /app/.output
22+
23+
EXPOSE 3000/tcp
24+
25+
CMD ["/app/.output/server/index.mjs"]

0 commit comments

Comments
 (0)