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:
@ -11,11 +11,12 @@ services:
|
||||
STORAGE_DIR: /data/storage
|
||||
JWT_SECRET: ${JWT_SECRET:-dev-change-me-readabook}
|
||||
OPEN_LIBRARY_ENABLED: ${OPEN_LIBRARY_ENABLED:-true}
|
||||
LIBRARY_PATH_ALIASES: ${READABOOK_LIBRARY_ALIAS_FROM:-/library}=/library
|
||||
INITIAL_ADMIN_EMAIL: ${INITIAL_ADMIN_EMAIL:-admin@readabook.local}
|
||||
INITIAL_ADMIN_PASSWORD: ${INITIAL_ADMIN_PASSWORD:-readabook-admin-change-me}
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- ./data/library:/library:ro
|
||||
- /home/anthony/Documents/Projects/ReadaBook/Books:/library:ro
|
||||
healthcheck:
|
||||
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3000/healthz').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
|
||||
interval: 10s
|
||||
|
||||
Reference in New Issue
Block a user