job "loki" { datacenters = ["homelab"] priority = 50 type = "service" meta { forcedeploy = "0" } constraint { attribute = "${node.class}" operator = "set_contains" value = "cluster" } group "loki" { network { mode = "host" port "http" { static = 3100 } } task "loki" { driver = "docker" service { name = "loki" port = "http" check { name = "Loki HTTP" type = "http" path = "/ready" interval = "5s" timeout = "2s" check_restart { limit = 2 grace = "60s" ignore_warnings = false } } } config { image = "grafana/loki" ports = ["http"] args = [ "-config.file", "/etc/loki/local-config.yaml", ] volumes = [ "/mnt/diskstation/nomad/loki:/loki" ] } template { data = <