Text-to-Document-Generation/PDF-Redaction-API
0
1version: '3.8'2 3services:4 api:5 build:6 context: .7 dockerfile: Dockerfile8 ports:9 - "7860:7860"10 volumes:11 # Mount code for development (hot reload)12 - .:/app13 # Persistent storage for uploads/outputs14 - ./uploads:/app/uploads15 - ./outputs:/app/outputs16 environment:17 - PYTHONUNBUFFERED=118 - HF_HOME=/app/cache19 - LOG_LEVEL=DEBUG20 command: uvicorn main:app --host 0.0.0.0 --port 7860 --reload21 restart: unless-stopped22 healthcheck:23 test: ["CMD", "curl", "-f", "http://localhost:7860/health"]24 interval: 30s25 timeout: 10s26 retries: 327 start_period: 40s28 29 # Optional: Add nginx for production30 # nginx:31 # image: nginx:alpine32 # ports:33 # - "80:80"34 # volumes:35 # - ./nginx.conf:/etc/nginx/nginx.conf36 # depends_on:37 # - api38 39 # Optional: Add Redis for caching40 # redis:41 # image: redis:alpine42 # ports:43 # - "6379:6379"44 # volumes:45 # - redis-data:/data46 47# volumes:48# redis-data:49 