Files
ciaovolo/flight-comparator/Dockerfile.frontend
domverse 8eeb774d4e
All checks were successful
Deploy / deploy (push) Successful in 11s
fix: replace wget --spider with wget -qO /dev/null for healthcheck
--spider sends a HEAD request which newer BusyBox builds in nginx:alpine
may not handle consistently. A plain GET to /dev/null is more reliable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 12:40:31 +01:00

20 lines
719 B
Docker

# ── Stage 1: Build React frontend ─────────────────────────────────────────
FROM node:20-alpine AS builder
WORKDIR /app
COPY frontend/package*.json ./
RUN npm ci
COPY frontend/ .
RUN npx vite build
# ── Stage 2: Serve with nginx ──────────────────────────────────────────────
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD wget -qO /dev/null http://localhost/ || exit 1