You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
414 B
18 lines
414 B
FROM node:20-alpine as build |
|
WORKDIR /app |
|
ENV PNPM_HOME="/pnpm" |
|
ENV PATH="$PNPM_HOME:$PATH" |
|
RUN corepack enable |
|
|
|
COPY package.json ./ |
|
COPY pnpm-lock.yaml ./ |
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile |
|
|
|
COPY . ./ |
|
RUN pnpm run build |
|
|
|
# production environment |
|
FROM nginx:stable-alpine |
|
COPY --from=build /app/dist /usr/share/nginx/html |
|
EXPOSE 80 |
|
CMD ["nginx", "-g", "daemon off;"]
|
|
|