fix: use standard Navidrome variables to isolate DB on LiteFS and metadata on host volume
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled

This commit is contained in:
2026-04-27 08:56:22 -07:00
parent 37f0dcb1e7
commit 6e7c729c5e

View File

@@ -84,8 +84,15 @@ start_app() {
# Ensure shared directories exist on persistent host volume
mkdir -p /data/plugins /data/cache /data/backup
# Tell Navidrome to use the database directly from the LiteFS mount.
export ND_DBPATH="/litefs/navidrome.db?cache=shared&_busy_timeout=15000&_journal_mode=WAL&_foreign_keys=on"
# Officially supported variables to split the database from the metadata
export ND_DATAFOLDER="/litefs"
export ND_CACHEFOLDER="/data/cache"
export ND_BACKUP_PATH="/data/backup"
export ND_PLUGINS_FOLDER="/data/plugins"
# We can still pass the SQLite optimization flags via ND_DBPATH
# but we'll use a relative path so it respects ND_DATAFOLDER
export ND_DBPATH="navidrome.db?cache=shared&_busy_timeout=15000&_journal_mode=WAL&_foreign_keys=on"
/app/navidrome &
NAVIDROME_PID=$!