Files
hatchet/build/package/frontend.dockerfile
2024-01-12 13:00:32 +07:00

22 lines
522 B
Docker

FROM node:18-alpine as build
WORKDIR /app
COPY ./frontend/app/package.json ./frontend/app/pnpm-lock.yaml ./
RUN corepack pnpm --version
RUN corepack pnpm install --frozen-lockfile && corepack pnpm store prune
COPY ./frontend/app ./
RUN npm run build
# Stage 2: Serve the built app with NGINX
FROM nginx:alpine
ARG APP_TARGET=client
COPY ./build/package/nginx.conf /etc/nginx/nginx.conf
RUN rm -rf /usr/share/nginx/html/*
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]