job "prometheus" { datacenters = ["alo"] type = "service" meta { version = "2" } group "monitoring" { count = 1 network { port "http" { #host_network = "tailscale" static = "9090" } port "push" { static = "9091" } } task "prometheus" { driver = "docker" config { image = "prom/prometheus:v2.52.0" network_mode = "host" args = [ "--storage.tsdb.path", "/opt/prometheus", "--web.listen-address", "0.0.0.0:9090", "--storage.tsdb.retention.time", "90d", "--web.enable-admin-api" ] force_pull = true ports = ["http"] volumes = [ "local/alerts.yml:/prometheus/alerts.yml", "local/prometheus.yml:/prometheus/prometheus.yml", "/data/compute/appdata/prometheus:/opt/prometheus", ] } service { name = "prometheus" port = "http" tags = [ "traefik.enable=true", "traefik.http.routers.prometheus.entryPoints=websecure", "traefik.http.routers.prometheus.middlewares=authentik@file", ] check { type = "http" path = "/-/healthy" name = "http" interval = "5s" timeout = "2s" } } # main configuration file template { data = <