almeira-web/facturacion-dian-hub/Dockerfile.frontend

29 lines
645 B
Docker

# ==========================================
# MULTI-STAGE DOCKERFILE - FRONTEND REACT/VITE
# DIAN Fiscal Hub Modern Admin Panel
# ==========================================
# Stage 1: Build
FROM node:22-alpine AS builder
WORKDIR /app
COPY frontend/package*.json ./
RUN npm ci
COPY frontend/ ./
RUN npm run build
# Stage 2: Production Nginx Minimal
FROM nginx:1.27-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=3s --retries=3 \
CMD wget --quiet --tries=1 --spider http://localhost/ || exit 1
CMD ["nginx", "-g", "daemon off;"]