Download docker-compose.yml from Text-to-Document-Generation/PDF-Redaction-API: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/spaces/Text-to-Document-Generation/PDF-Redaction-API/resolve/main/docker-compose.yml
- Command line
-
hf download hf://spaces/Text-to-Document-Generation/PDF-Redaction-API/docker-compose.yml
-
curl -L -o docker-compose.yml https://huggingface.co/spaces/Text-to-Document-Generation/PDF-Redaction-API/resolve/main/docker-compose.yml
1.04 kB
| version: '3.8' | |
| services: | |
| api: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| ports: | |
| - "7860:7860" | |
| volumes: | |
| # Mount code for development (hot reload) | |
| - .:/app | |
| # Persistent storage for uploads/outputs | |
| - ./uploads:/app/uploads | |
| - ./outputs:/app/outputs | |
| environment: | |
| - PYTHONUNBUFFERED=1 | |
| - HF_HOME=/app/cache | |
| - LOG_LEVEL=DEBUG | |
| command: uvicorn main:app --host 0.0.0.0 --port 7860 --reload | |
| restart: unless-stopped | |
| healthcheck: | |
| test: ["CMD", "curl", "-f", "http://localhost:7860/health"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 3 | |
| start_period: 40s | |
| # Optional: Add nginx for production | |
| # nginx: | |
| # image: nginx:alpine | |
| # ports: | |
| # - "80:80" | |
| # volumes: | |
| # - ./nginx.conf:/etc/nginx/nginx.conf | |
| # depends_on: | |
| # - api | |
| # Optional: Add Redis for caching | |
| # redis: | |
| # image: redis:alpine | |
| # ports: | |
| # - "6379:6379" | |
| # volumes: | |
| # - redis-data:/data | |
| # volumes: | |
| # redis-data: | |