Download docker/Dockerfile.frontend from yusufcalisir/Collaborative-Fraud-Intelligence-Simulator: direct link, hf CLI and curl.
- Browser
- Download file 944 Bytes
-
https://huggingface.co/spaces/yusufcalisir/Collaborative-Fraud-Intelligence-Simulator/resolve/main/docker/Dockerfile.frontend
- Command line
-
hf download hf://spaces/yusufcalisir/Collaborative-Fraud-Intelligence-Simulator/docker/Dockerfile.frontend
-
curl -L -o Dockerfile.frontend https://huggingface.co/spaces/yusufcalisir/Collaborative-Fraud-Intelligence-Simulator/resolve/main/docker/Dockerfile.frontend
944 Bytes
| # Multi-Stage Production Dockerfile for CFI Frontend SPA | |
| # Stage 1: Build production bundle | |
| FROM node:22-alpine AS builder | |
| WORKDIR /app | |
| # Copy package manifests first for optimal layer caching | |
| COPY frontend/package.json frontend/package-lock.json ./ | |
| RUN npm ci --prefer-offline --no-audit | |
| # Copy source code and configuration files | |
| COPY frontend/ ./ | |
| # Build production distribution | |
| RUN npm run build | |
| # Stage 2: Minimalist, hardened Nginx runtime | |
| FROM nginx:1.27-alpine-slim AS runtime | |
| # Remove default Nginx welcome site | |
| RUN rm -rf /usr/share/nginx/html/* /etc/nginx/conf.d/default.conf | |
| # Copy custom SPA Nginx configuration | |
| COPY docker/nginx/frontend-nginx.conf /etc/nginx/conf.d/default.conf | |
| # Copy compiled assets from builder | |
| COPY --from=builder /app/dist /usr/share/nginx/html | |
| EXPOSE 80 | |
| HEALTHCHECK --interval=10s --timeout=3s --retries=3 \ | |
| CMD wget -qO- http://127.0.0.1/health || exit 1 | |
| CMD ["nginx", "-g", "daemon off;"] | |