job "telemetry-service" { datacenters = ["corrin", "scorpio"] type = "service" group "grafana" { count = 1 network { port "grafana" { static = 3719 } } task "restore-db" { lifecycle { hook = "prestart" sidecar = false } driver = "docker" config { image = "litestream/litestream:0.3.13" args = [ "restore", "-config", "/etc/litestream.yml", "/ephemeral/grafana.db" ] volumes = [ "../alloc/data:/ephemeral", "secrets/litestream.yml:/etc/litestream.yml" ] } user = "472" template { data = file("../config/grafana-litestream.yml") destination = "secrets/litestream.yml" } resources { memory = 50 memory_max = 200 cpu = 100 } } task "grafana" { driver = "docker" config { image = "grafana/grafana:10.3.4" network_mode = "host" ports = [ "grafana" ] volumes = [ "../alloc/data:/var/lib/grafana", "secrets/prometheus.yaml:/etc/grafana/provisioning/datasources/prometheus.yaml", "secrets/ldap.toml:/etc/grafana/ldap.toml" ] } template { data = file("../config/grafana-datasource-prometheus.yaml") destination = "secrets/prometheus.yaml" } template { data = file("../config/grafana-ldap.toml") destination = "secrets/ldap.toml" } template { data = <