fix(deploy): increase OCR healthcheck start_period, comment ocr_cache volume, add token hint
Some checks failed
CI / Unit & Component Tests (push) Failing after 2s
CI / Backend Unit Tests (push) Failing after 1s

- start_period 60s → 120s: Zenodo download on cold start can exceed 60s on slow connections
- ocr_cache volume comment: documents what the cache stores for future operators
- .env.example: add token generation command to prevent weak placeholder in production

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit was merged in pull request #234.
This commit is contained in:
Marcel
2026-04-14 15:29:28 +02:00
committed by marcel
parent 7562a400c0
commit e4719b9487
2 changed files with 3 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ PORT_MAILPIT_SMTP=1025
# OCR Training — secret token required to call /train and /segtrain on the OCR service. # OCR Training — secret token required to call /train and /segtrain on the OCR service.
# Also set in the backend so it can pass the token through. Must not be empty in production. # Also set in the backend so it can pass the token through. Must not be empty in production.
# Generate with: python3 -c "import secrets; print(secrets.token_hex(32))"
OCR_TRAINING_TOKEN=change-me-in-production OCR_TRAINING_TOKEN=change-me-in-production
# Production SMTP — uncomment and fill in to send real emails instead of catching them # Production SMTP — uncomment and fill in to send real emails instead of catching them

View File

@@ -87,7 +87,7 @@ services:
memswap_limit: 12g memswap_limit: 12g
volumes: volumes:
- ocr_models:/app/models - ocr_models:/app/models
- ocr_cache:/root/.cache - ocr_cache:/root/.cache # Hugging Face / ketos model download cache — prevents re-downloads on container recreate
environment: environment:
KRAKEN_MODEL_PATH: /app/models/german_kurrent.mlmodel KRAKEN_MODEL_PATH: /app/models/german_kurrent.mlmodel
TRAINING_TOKEN: "${OCR_TRAINING_TOKEN:-}" TRAINING_TOKEN: "${OCR_TRAINING_TOKEN:-}"
@@ -102,7 +102,7 @@ services:
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 12 retries: 12
start_period: 60s start_period: 120s
# --- Backend: Spring Boot --- # --- Backend: Spring Boot ---
backend: backend: