fix(entrypoint): use ND_DBPATH env var and remove set -e
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 44s

This commit is contained in:
2026-04-27 09:33:34 -07:00
parent af8ce0ef2b
commit 5311f0069a

View File

@@ -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"
}