job "prometheus" { datacenters = ["dc1"] group "prometheus" { count = 1 network { mode = "bridge" port "web" { host_network = "wesher" to = 9090 } } # ephemeral_disk { # migrate = true # sticky = true # } service { name = "prometheus" provider = "nomad" port = "web" // TODO: Remove traefik tags tags = [ "traefik.enable=true", "traefik.http.routers.prometheus.entryPoints=websecure", ] } task "prometheus" { driver = "docker" config { image = "prom/prometheus:v2.43.0" ports = ["web"] args = [ "--config.file=/etc/prometheus/config/prometheus.yml", "--storage.tsdb.path=${NOMAD_ALLOC_DIR}/data/tsdb", "--web.listen-address=0.0.0.0:9090", "--web.console.libraries=/usr/share/prometheus/console_libraries", "--web.console.templates=/usr/share/prometheus/consoles", ] mount { type = "bind" target = "/etc/prometheus/config" source = "local/config" } } template { data = <