mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-15 09:25:08 +01:00
19 lines
418 B
Plaintext
19 lines
418 B
Plaintext
FROM node:16.15-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/build /usr/share/nginx/html
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"]
|