Dockerfile 322 B

123456789101112131415161718192021
  1. FROM node:18-alpine AS build
  2. WORKDIR /app
  3. COPY package.json pnpm-lock.yaml ./
  4. RUN npm install -g pnpm && pnpm install
  5. COPY . .
  6. RUN pnpm build
  7. FROM nginx:alpine AS runtime
  8. COPY --from=build /app/dist /usr/share/nginx/html
  9. COPY nginx.conf /etc/nginx/conf.d/default.conf
  10. EXPOSE 80
  11. CMD ["nginx", "-g", "daemon off;"]