FROM node:18-alpine AS build WORKDIR /app COPY package*.json ./ RUN if [ -f package-lock.json ]; then npm ci --no-audit --no-fund; else npm install --no-audit --no-fund; fi COPY . . ARG VITE_API_URL=/api/v1 ENV VITE_API_URL=${VITE_API_URL} RUN npm run build FROM nginx:alpine COPY nginx.conf /etc/nginx/nginx.conf COPY --from=build /app/dist /usr/share/nginx/html EXPOSE 80 HEALTHCHECK CMD wget -q -O - http://127.0.0.1:80/ >/dev/null 2>&1 || exit 1