chore: backup infrastructure configurations [skip ci]
This commit is contained in:
@@ -11,32 +11,24 @@ job "navidrome" {
|
||||
group "navidrome" {
|
||||
count = 1
|
||||
|
||||
# Prestart restore task
|
||||
task "restore" {
|
||||
driver = "docker"
|
||||
lifecycle {
|
||||
hook = "prestart"
|
||||
sidecar = false
|
||||
}
|
||||
config {
|
||||
image = "litestream/litestream:latest"
|
||||
args = [
|
||||
"restore",
|
||||
"-if-replica-exists",
|
||||
"-if-db-not-exists",
|
||||
"-o", "/alloc/tmp/navidrome.db",
|
||||
"sftp://root:odroid@192.168.4.63/mnt/Shares/litestream/navidrome.db"
|
||||
|
||||
]
|
||||
volumes = [
|
||||
"/mnt/configs/navidrome:/data"
|
||||
]
|
||||
}
|
||||
volume "navidrome-csi-vol" {
|
||||
type = "csi"
|
||||
source = "navidrome-volume" # This must match the 'id' in your volume registration
|
||||
attachment_mode = "file-system"
|
||||
access_mode = "multi-node-multi-writer"
|
||||
}
|
||||
|
||||
# Main Navidrome task
|
||||
task "navidrome" {
|
||||
driver = "docker"
|
||||
|
||||
volume_mount {
|
||||
volume = "navidrome-csi-vol" # Matches the name in the volume block above
|
||||
destination = "/data" # Where it appears inside the container
|
||||
read_only = false
|
||||
}
|
||||
|
||||
|
||||
config {
|
||||
image = "ghcr.io/navidrome/navidrome:latest"
|
||||
memory_hard_limit = "2048"
|
||||
@@ -45,13 +37,10 @@ job "navidrome" {
|
||||
"/mnt/Public/Downloads/Clean_Music:/music/CleanMusic:ro",
|
||||
"/mnt/Public/Downloads/news/slskd/downloads:/music/slskd:ro",
|
||||
"/mnt/Public/Downloads/incoming_music:/music/incomingmusic:ro",
|
||||
"/mnt/configs/navidrome:/data"
|
||||
|
||||
#"/mnt/configs/navidrome:/data"
|
||||
]
|
||||
}
|
||||
env {
|
||||
ND_DATAFOLDER = "/alloc/tmp/"
|
||||
ND_CACHEFOLDER = "./data/cache"
|
||||
ND_SCANSCHEDULE = "32 8-20 * * *"
|
||||
ND_LOGLEVEL = "debug"
|
||||
ND_REVERSEPROXYWHITELIST = "0.0.0.0/0"
|
||||
@@ -86,25 +75,6 @@ job "navidrome" {
|
||||
}
|
||||
}
|
||||
|
||||
# Litestream sidecar for continuous replication
|
||||
task "litestream" {
|
||||
driver = "docker"
|
||||
lifecycle {
|
||||
hook = "poststart" # runs after main task starts
|
||||
sidecar = true
|
||||
}
|
||||
config {
|
||||
image = "litestream/litestream:latest"
|
||||
args = [
|
||||
"replicate",
|
||||
"/alloc/tmp/navidrome.db",
|
||||
"sftp://root:odroid@192.168.4.63/mnt/Shares/litestream/navidrome.db"
|
||||
]
|
||||
volumes = [
|
||||
"/mnt/configs/navidrome:/data"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
network {
|
||||
port "http" {
|
||||
|
||||
Reference in New Issue
Block a user