removal of hard codeing
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# NFOGuard Configuration Guide
|
||||
|
||||
## ⚠️ IMPORTANT: All paths must be configured via environment variables
|
||||
|
||||
NFOGuard has **zero hardcoded paths** - everything must be explicitly configured in your environment variables to match your specific setup.
|
||||
|
||||
## Required Environment Variables
|
||||
|
||||
### Media Paths (REQUIRED)
|
||||
```bash
|
||||
# Container paths (what NFOGuard sees inside the Docker container)
|
||||
MOVIE_PATHS=/your/container/movie/path1,/your/container/movie/path2
|
||||
TV_PATHS=/your/container/tv/path1,/your/container/tv/path2
|
||||
|
||||
# External service paths (what Radarr/Sonarr see on the host)
|
||||
RADARR_ROOT_FOLDERS=/host/radarr/path1,/host/radarr/path2
|
||||
SONARR_ROOT_FOLDERS=/host/sonarr/path1,/host/sonarr/path2
|
||||
```
|
||||
|
||||
### Example Configuration
|
||||
```bash
|
||||
# For a typical setup:
|
||||
MOVIE_PATHS=/media/Movies/movies,/media/Movies/movies6
|
||||
TV_PATHS=/media/TV/tv,/media/TV/tv6
|
||||
RADARR_ROOT_FOLDERS=/mnt/unionfs/Media/Movies/movies,/mnt/unionfs/Media/Movies/movies6
|
||||
SONARR_ROOT_FOLDERS=/mnt/unionfs/Media/TV/tv,/mnt/unionfs/Media/TV/tv6
|
||||
```
|
||||
|
||||
### Database & Logging
|
||||
```bash
|
||||
DB_PATH=/app/data/media_dates.db
|
||||
LOG_DIR=/app/data/logs
|
||||
```
|
||||
|
||||
## Path Mapping Logic
|
||||
1. Webhook receives path from Radarr: `/mnt/unionfs/Media/Movies/movies6/Movie...`
|
||||
2. Matches against `RADARR_ROOT_FOLDERS[1]`: `/mnt/unionfs/Media/Movies/movies6`
|
||||
3. Maps to corresponding `MOVIE_PATHS[1]`: `/media/Movies/movies6`
|
||||
4. Final container path: `/media/Movies/movies6/Movie...`
|
||||
|
||||
## Zero Hardcoded Paths
|
||||
- ✅ No default fallback paths
|
||||
- ✅ Application fails with clear error if paths not configured
|
||||
- ✅ Works with any folder structure
|
||||
- ✅ Completely portable between environments
|
||||
Reference in New Issue
Block a user