fix(api): chemins de bibliothèques — validation dédiée, alias et unicité

Validation des chemins externalisée (library-path) avec codes d'erreur
explicites, support d'alias LIBRARY_PATH_ALIASES pour traduire un chemin
hôte vers le montage conteneur, rejet des doublons de chemin entre
bibliothèques, documentation README/.env.example et docker-compose
paramétrable via READABOOK_LIBRARY_HOST_PATH.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Git Agent
2026-08-23 16:23:57 +02:00
parent 0fa2f99289
commit 7b72cc0d83
8 changed files with 194 additions and 16 deletions

10
.env.example Normal file
View File

@ -0,0 +1,10 @@
# Local compose defaults. Copy to .env when you need machine-specific paths.
# Directory mounted read-only as /library in the API container.
READABOOK_LIBRARY_HOST_PATH=./data/library
# Optional path accepted by the API and translated to /library.
# For QA with the real local corpus, set for example:
# READABOOK_LIBRARY_HOST_PATH=./Books
# READABOOK_LIBRARY_ALIAS_FROM=/absolute/path/to/ReadaBook/Books
READABOOK_LIBRARY_ALIAS_FROM=/library