admin / Bid-Sentinel
publicBid Scrape and Tracking Application with AI Capability
Bid-Sentinel / bid-sentinel-v2 / frontend / Dockerfile
805 B · main
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Base images pulled via the Docker Hub mirror (mirror.gcr.io) to avoid # registry-1.docker.io timeouts. Revert to node:20-alpine / nginx:1.27-alpine # if pulling direct from Docker Hub works in your environment. # --- Build stage --- FROM mirror.gcr.io/library/node:20-alpine AS build WORKDIR /app COPY package.json package-lock.json* ./ RUN npm install COPY . . # API base URL is injected at build time (Vite inlines VITE_* vars). # Defaults to same-origin /api, reverse-proxied to the backend by nginx. ARG VITE_API_BASE_URL=/api ENV VITE_API_BASE_URL=$VITE_API_BASE_URL RUN npm run build # --- Serve stage --- FROM mirror.gcr.io/library/nginx:1.27-alpine COPY nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] |