mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
22 lines
476 B
Docker
22 lines
476 B
Docker
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
|
|
|
|
ARG PWA_ENABLED="false"
|
|
|
|
ENV VITE_PWA_ENABLED=${PWA_ENABLED}
|
|
|
|
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;"]
|