Spaces:
Sleeping
Sleeping
Download Dockerfile from ccjulia/zero_friction: direct link, hf CLI and curl.
- Browser
- Download file 1.96 kB
-
https://huggingface.co/spaces/ccjulia/zero_friction/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ccjulia/zero_friction/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ccjulia/zero_friction/resolve/main/Dockerfile
1.96 kB
| # ββββββββββββββββββββββββββββββββββββββββββββββ | |
| # Stage 1 β Build Angular frontend | |
| # ββββββββββββββββββββββββββββββββββββββββββββββ | |
| FROM node:20-alpine AS frontend-build | |
| WORKDIR /app/frontend | |
| COPY frontend/package.json frontend/package-lock.json ./ | |
| RUN npm ci | |
| COPY frontend/ ./ | |
| RUN npx ng build --configuration=production | |
| # ββββββββββββββββββββββββββββββββββββββββββββββ | |
| # Stage 2 β Production image (nginx + FastAPI) | |
| # ββββββββββββββββββββββββββββββββββββββββββββββ | |
| FROM python:3.12-slim | |
| # Install nginx & supervisor | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends nginx supervisor && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # ββ Python backend βββββββββββββββββββββββββββ | |
| WORKDIR /app | |
| COPY backend/requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY backend/ ./backend/ | |
| # ββ Frontend static files ββββββββββββββββββββ | |
| COPY --from=frontend-build /app/frontend/dist/frontend/browser /usr/share/nginx/html | |
| # ββ Nginx config βββββββββββββββββββββββββββββ | |
| COPY nginx.conf /etc/nginx/conf.d/default.conf | |
| # Remove default nginx site that might conflict | |
| RUN rm -f /etc/nginx/sites-enabled/default | |
| # ββ Supervisor config ββββββββββββββββββββββββ | |
| COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
| # Hugging Face Spaces uses port 7860 | |
| EXPOSE 7860 | |
| CMD ["supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] | |