Increase Health Check Start Period

This commit is contained in:
MangoPig
2026-02-21 23:10:24 +00:00
parent 3b52c2ba02
commit 3b95d65e2d
+15 -15
View File
@@ -17,25 +17,25 @@ services:
entrypoint: ["/bin/sh", "-c"] entrypoint: ["/bin/sh", "-c"]
command: command:
- | - |
# Download Chinese OCR models if missing (first run only) # Download Chinese OCR models if missing (first run only)
# Note: ch_sim and ch_tra are mutually exclusive, must download separately # Note: ch_sim and ch_tra are mutually exclusive, must download separately
if [ ! -f /opt/app-root/src/.cache/docling/models/EasyOcr/zh_sim_g2.pth ]; then if [ ! -f /opt/app-root/src/.cache/docling/models/EasyOcr/zh_sim_g2.pth ]; then
echo "Downloading Simplified Chinese OCR model..." echo "Downloading Simplified Chinese OCR model..."
python3 -c "import easyocr; easyocr.Reader(['en','ch_sim'], gpu=False)" python3 -c "import easyocr; easyocr.Reader(['en','ch_sim'], gpu=False)"
cp -n /opt/app-root/src/.EasyOCR/model/*.pth /opt/app-root/src/.cache/docling/models/EasyOcr/ 2>/dev/null || true cp -n /opt/app-root/src/.EasyOCR/model/*.pth /opt/app-root/src/.cache/docling/models/EasyOcr/ 2>/dev/null || true
fi fi
if [ ! -f /opt/app-root/src/.cache/docling/models/EasyOcr/zh_tra_g2.pth ]; then if [ ! -f /opt/app-root/src/.cache/docling/models/EasyOcr/zh_tra_g2.pth ]; then
echo "Downloading Traditional Chinese OCR model..." echo "Downloading Traditional Chinese OCR model..."
python3 -c "import easyocr; easyocr.Reader(['en','ch_tra'], gpu=False)" python3 -c "import easyocr; easyocr.Reader(['en','ch_tra'], gpu=False)"
cp -n /opt/app-root/src/.EasyOCR/model/*.pth /opt/app-root/src/.cache/docling/models/EasyOcr/ 2>/dev/null || true cp -n /opt/app-root/src/.EasyOCR/model/*.pth /opt/app-root/src/.cache/docling/models/EasyOcr/ 2>/dev/null || true
fi fi
exec uvicorn docling_serve.app:app --host 0.0.0.0 --port 5001 exec uvicorn docling_serve.app:app --host 0.0.0.0 --port 5001
healthcheck: healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:5001/health"] test: ["CMD", "curl", "-sf", "http://localhost:5001/health"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 5
start_period: 120s start_period: 500s
# Ollama # Ollama
ollama: ollama: