This commit is contained in:
Daniel Berteaud 2024-04-27 23:22:37 +02:00
parent cb472a0a74
commit 3c8cbea12b
2 changed files with 25 additions and 12 deletions

View File

@ -5,21 +5,30 @@ job "navidrome" {
region = "global"
group "navidrome" {
shutdown_delay = "6s"
ephemeral_disk {
# Use minimal ephemeral disk
size = 101
}
network {
mode = "bridge"
}
volume "data" {
source = "navidrome-data"
type = "csi"
access_mode = "single-node-writer"
attachment_mode = "file-system"
}
volume "music" {
source = "music"
type = "csi"
@ -73,8 +82,8 @@ job "navidrome" {
type = "http"
path = "/ping"
expose = true
interval = "10s"
timeout = "3s"
interval = "30s"
timeout = "5s"
check_restart {
limit = 20
@ -124,7 +133,10 @@ job "navidrome" {
user = 4533
config {
image = "deluan/navidrome:0.51.1"
image = "deluan/navidrome:0.52.0"
readonly_rootfs = true
pids_limit = 100
}
env {

View File

@ -1,10 +1,10 @@
[[ $c := merge .navidrome . -]]
job "[[ .instance ]]" {
[[ template "common/job_start" $c ]]
[[ template "common/job_start" . ]]
group "navidrome" {
[[- $c := merge .navidrome . -]]
[[ template "common/group_start" $c ]]
network {
mode = "bridge"
@ -31,8 +31,8 @@ job "[[ .instance ]]" {
type = "http"
path = "/ping"
expose = true
interval = "10s"
timeout = "3s"
interval = "[[ $c.consul.check.interval ]]"
timeout = "[[ $c.consul.check.timeout ]]"
check_restart {
limit = 20
@ -72,7 +72,8 @@ job "[[ .instance ]]" {
user = 4533
config {
image = "[[ $c.image ]]"
[[ template "common/image" $c ]]
pids_limit = 100
}
env {
@ -103,7 +104,7 @@ job "[[ .instance ]]" {
}
[[- if and $c.backup.enabled (not (eq $c.backup.cron "")) ]]
[[- $c := merge .navidrome.backup .navidrome . ]]
[[- $c := merge .navidrome.backup .navidrome . ]]
task "backup" {
driver = "[[ $c.nomad.driver ]]"