diff --git a/frigate.nomad b/frigate.nomad index b17d3a6..6016601 100644 --- a/frigate.nomad +++ b/frigate.nomad @@ -16,26 +16,16 @@ job "frigate" { auto_revert = true } + ephemeral_disk { + sticky = true + migrate = true + size = 20480 + } + network { port "http" { to = 5000 } } - volume "frigate-config" { - type = "host" - source = "frigate-config" - read_only = false - access_mode = "single-node-writer" - attachment_mode = "file-system" - } - - volume "frigate-media" { - type = "host" - source = "frigate-media" - read_only = false - access_mode = "single-node-writer" - attachment_mode = "file-system" - } - task "frigate" { driver = "docker" @@ -44,22 +34,14 @@ job "frigate" { force_pull = true privileged = true shm_size = 268435456 - volumes = ["/etc/localtime:/etc/localtime:ro"] + volumes = [ + "${NOMAD_ALLOC_DIR}/frigate-config:/config", + "${NOMAD_ALLOC_DIR}/frigate-media:/media/frigate", + "/etc/localtime:/etc/localtime:ro", + ] ports = ["http"] } - volume_mount { - volume = "frigate-config" - destination = "/config" - read_only = false - } - - volume_mount { - volume = "frigate-media" - destination = "/media/frigate" - read_only = false - } - env { FRIGATE_RTSP_PASSWORD = "" }