Dockerfile 395 B

1234567891011121314
  1. FROM node:20 as build-stage
  2. WORKDIR /app
  3. COPY package*.json /app/
  4. RUN npm install
  5. COPY ./ /app/
  6. ARG VITE_API_URL=${VITE_API_URL}
  7. RUN npm run build
  8. FROM nginx:1
  9. COPY --from=build-stage /app/dist/ /usr/share/nginx/html
  10. COPY ./nginx.conf /etc/nginx/conf.d/default.conf
  11. COPY ./nginx-backend-not-found.conf /etc/nginx/extra-conf.d/backend-not-found.conf
  12. EXPOSE 80
  13. VOLUME [ "/usr/share/nginx/html" ]