Skip to content

Commit 013a922

Browse files
committed
fix: dockerfile
1 parent e9fb5be commit 013a922

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

Dockerfile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
FROM node:lts AS runtime
2-
WORKDIR /app
1+
FROM node:lts AS build
32

4-
COPY . .
3+
ENV PNPM_HOME="/pnpm"
4+
ENV PATH="$PNPM_HOME:$PATH"
5+
RUN corepack enable
56

6-
RUN npm install
7-
RUN npm run build
7+
WORKDIR /app
8+
COPY package*.json ./
9+
RUN pnpm install
10+
COPY . .
11+
RUN pnpm run build
812

9-
ENV HOST=0.0.0.0
10-
ENV PORT=4321
11-
EXPOSE 4321
12-
CMD ["node", "./dist/server/entry.mjs"]
13+
FROM nginx:alpine AS runtime
14+
COPY --from=build /app/dist /var/html

0 commit comments

Comments
 (0)