fix: use symlink for DB and move DataFolder to /shared_data to avoid LiteFS root write errors
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 46s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 46s
This commit is contained in:
@@ -99,16 +99,20 @@ start_app() {
|
|||||||
# Ensure shared directories exist
|
# Ensure shared directories exist
|
||||||
mkdir -p /shared_data/plugins /shared_data/cache /shared_data/backup /shared_data/artist_images
|
mkdir -p /shared_data/plugins /shared_data/cache /shared_data/backup /shared_data/artist_images
|
||||||
|
|
||||||
|
# Create symlink for the DB so Navidrome finds it in its DataFolder
|
||||||
|
# We do this every time to ensure it points to the correct LiteFS mount
|
||||||
|
ln -sf /data/navidrome.db /shared_data/navidrome.db
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
export ND_DATAFOLDER="/data"
|
export ND_DATAFOLDER="/shared_data"
|
||||||
export ND_CACHEFOLDER="/shared_data/cache"
|
export ND_CACHEFOLDER="/shared_data/cache"
|
||||||
export ND_BACKUP_PATH="/shared_data/backup"
|
export ND_BACKUP_PATH="/shared_data/backup"
|
||||||
export ND_PLUGINS_FOLDER="/shared_data/plugins"
|
export ND_PLUGINS_FOLDER="/shared_data/plugins"
|
||||||
export ND_ARTISTIMAGEFOLDER="/shared_data/artist_images"
|
export ND_ARTISTIMAGEFOLDER="artist_images" # This is a folder NAME within each artist folder
|
||||||
|
|
||||||
/app/navidrome &
|
/app/navidrome &
|
||||||
NAVIDROME_PID=$!
|
NAVIDROME_PID=$!
|
||||||
echo "Navidrome running (PID: $NAVIDROME_PID) with data folder at /data"
|
echo "Navidrome running (PID: $NAVIDROME_PID) with data folder at /shared_data (DB symlinked to /data)"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Stop Navidrome
|
# Stop Navidrome
|
||||||
|
|||||||
@@ -63,11 +63,11 @@ job "navidrome-litefs" {
|
|||||||
PORT = "8080" # Internal proxy port (unused but kept)
|
PORT = "8080" # Internal proxy port (unused but kept)
|
||||||
|
|
||||||
# Navidrome Config
|
# Navidrome Config
|
||||||
ND_DATAFOLDER = "/data"
|
ND_DATAFOLDER = "/shared_data"
|
||||||
ND_PLUGINS_FOLDER = "/shared_data/plugins"
|
ND_PLUGINS_FOLDER = "/shared_data/plugins"
|
||||||
ND_CACHEFOLDER = "/shared_data/cache"
|
ND_CACHEFOLDER = "/shared_data/cache"
|
||||||
ND_BACKUP_PATH = "/shared_data/backup"
|
ND_BACKUP_PATH = "/shared_data/backup"
|
||||||
ND_ARTISTIMAGEFOLDER = "/shared_data/artist_images"
|
ND_ARTISTIMAGEFOLDER = "artist_images"
|
||||||
ND_BACKUPSCHEDULE = ""
|
ND_BACKUPSCHEDULE = ""
|
||||||
|
|
||||||
ND_SCANSCHEDULE = "0"
|
ND_SCANSCHEDULE = "0"
|
||||||
|
|||||||
Reference in New Issue
Block a user