docling-studio/.env.example
Pier-Jean Malandrino 09145206d2 fix: limit upload to 5 MB / 20 pages max and increase conversion timeout
Prevents PyTorch/Docling pipeline crashes on HF Spaces CPU by:
- Reducing max file size from 50 MB to 5 MB
- Adding configurable MAX_PAGE_COUNT setting (env var, default unlimited)
- Increasing conversion timeout from 600s to 900s
- Adding frontend upload validation with explicit error messages
- Exposing maxPageCount via /api/health for dynamic UI hints
2026-04-07 10:56:16 +02:00

35 lines
1.1 KiB
Text

# Docker Compose build target: "local" or "remote" (selects Dockerfile target)
# CONVERSION_MODE=local
# Conversion engine: "local" (in-process Docling) or "remote" (Docling Serve)
# Set automatically by the Docker target — override only for local dev
# CONVERSION_ENGINE=local
# Docling Serve settings (remote mode only)
# DOCLING_SERVE_URL=http://localhost:5001
# DOCLING_SERVE_API_KEY=
# Max seconds per conversion (default: 900)
# CONVERSION_TIMEOUT=900
# Max parallel analysis jobs (default: 3)
# MAX_CONCURRENT_ANALYSES=3
# Max pages per PDF (default: 0 = unlimited). Set to 20 for HF Spaces.
# MAX_PAGE_COUNT=0
# Deployment mode: "self-hosted" (default) or "huggingface"
# Shows disclaimer banner when set to "huggingface"
# DEPLOYMENT_MODE=self-hosted
# Application version (set automatically by CI/Docker build)
# APP_VERSION=dev
# CORS (comma-separated origins, only needed for custom deployments)
# CORS_ORIGINS=http://localhost:3000,https://your-domain.com
# File storage path (inside container)
# UPLOAD_DIR=./uploads
# Database path (inside container)
# DB_PATH=./data/docling_studio.db