version: "3.9" services: ry-ocr: build: . container_name: ry-ocr restart: unless-stopped ports: - "8801:8801" environment: - APP_HOST=0.0.0.0 - APP_PORT=8801 - USE_GPU=false - OCR_LANG=ch - MAX_UPLOAD_MB=20 - PDF_DPI=200 - LOG_LEVEL=INFO volumes: # 模型缓存持久化(避免重建容器重新下载) - paddle_models:/root/.paddleocr healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8801/health"] interval: 30s timeout: 10s retries: 3 start_period: 60s volumes: paddle_models: