Some checks failed
CI / Unit & Component Tests (push) Failing after 2m55s
CI / OCR Service Tests (push) Successful in 18s
CI / Backend Unit Tests (push) Successful in 4m9s
CI / fail2ban Regex (push) Successful in 38s
CI / Compose Bucket Idempotency (push) Successful in 56s
CI / Unit & Component Tests (pull_request) Failing after 2m47s
CI / OCR Service Tests (pull_request) Successful in 17s
CI / Backend Unit Tests (pull_request) Successful in 4m12s
CI / fail2ban Regex (pull_request) Successful in 38s
CI / Compose Bucket Idempotency (pull_request) Successful in 57s
`MassImportService` reads the ODS spreadsheet and referenced PDFs from a hardcoded `/import` path inside the backend container. Dev compose already bind-mounts `./import:/import`, but the prod compose had no equivalent, so `POST /api/admin/import` would always fail on staging/prod with "no spreadsheet found". Mount strategy: - Source path is env-driven (`IMPORT_HOST_DIR`), defaulting to `/srv/familienarchiv/import` so the host path is stable across CI deploys (the compose working dir is recreated each run, so `./import` would not persist). - Read-only — `MassImportService` only reads (`Files.list` / `Files.walk`), never writes. Read-only mount makes that contract explicit and prevents the backend container from mutating the source PDFs. - Empty / missing path is harmless: the import API just returns the existing "no spreadsheet found" error rather than crashing the container. To use on staging: rsync the import folder to `/srv/familienarchiv-staging/import/` on the host, set `IMPORT_HOST_DIR=/srv/familienarchiv-staging/import` in `.env.staging`, redeploy, trigger import from `/admin/system`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
9.5 KiB
9.5 KiB