Dockerfile 376 B

12345678910111213141516171819202122232425
  1. # syntax=docker/dockerfile:1
  2. FROM node:20-alpine AS build
  3. WORKDIR /app
  4. COPY package.json package-lock.json* ./
  5. RUN npm ci
  6. COPY . .
  7. ARG VITE_API_URL
  8. ENV VITE_API_URL=${VITE_API_URL}
  9. RUN npm run build
  10. FROM nginx:1.27-alpine
  11. COPY nginx.conf /etc/nginx/conf.d/default.conf
  12. COPY --from=build /app/build /usr/share/nginx/html
  13. EXPOSE 80
  14. CMD ["nginx", "-g", "daemon off;"]