diff --git a/entrypoint.sh b/entrypoint.sh index 4b1cdd2..768d99b 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,4 @@ #!/bin/bash -set -e - # Configuration from environment SERVICE_NAME="navidrome" SERVICE_ID="${SERVICE_NAME}-${NOMAD_ALLOC_ID:-$(hostname)}" @@ -92,12 +90,12 @@ start_app() { export ND_BACKUP_PATH="/data/backup" export ND_PLUGINS_FOLDER="/data/plugins" - # 3. Start Navidrome with an explicit --dbpath flag. + # 3. Start Navidrome with ND_DBPATH environment variable. # This is the most authoritative way to set the DB location. # We include the SQLite connection string for WAL mode and performance. - local DB_STR="/litefs/navidrome.db?cache=shared&_busy_timeout=15000&_journal_mode=WAL&_foreign_keys=on" + export ND_DBPATH="/litefs/navidrome.db?cache=shared&_busy_timeout=15000&_journal_mode=WAL&_foreign_keys=on" - /app/navidrome --dbpath "$DB_STR" & + /app/navidrome & NAVIDROME_PID=$! echo "Navidrome running (PID: $NAVIDROME_PID) with database at /litefs" }