job "traefik-local" { datacenters = ["homelab"] priority = 90 type = "service" constraint { attribute = "${node.class}" operator = "set_contains" value = "cluster" } group "traefik-local" { network { mode = "host" port "http" { static = 80 } port "https" { static = 443 } port "ssh" { static = 2222 } port "smtp" { static = 25 } port "esmtp" { static = 465 } port "imap" { static= 993 } port "admin" { static = 9080 } } vault { policies = ["traefik"] } task "traefik" { driver = "docker" service { name = "traefik-local" tags = ["traefik"] port = "https" } service { name = "traefik-local-admin" port = "admin" tags = [ "homer.enable=true", "homer.name=Traefik admin", "homer.subtitle=LAN", "homer.service=Platform", "homer.logo=https://upload.wikimedia.org/wikipedia/commons/1/1b/Traefik.logo.png", "homer.target=_blank", "homer.url=http://${NOMAD_ADDR_admin}", ] } config { image = "traefik" ports = [ "http", "https", "admin", "ssh", "smtp", "esmtp", "imap", ] volumes = [ "local/traefik.toml:/etc/traefik/traefik.toml", "/mnt/diskstation/nomad/traefik/acme-local.json:/acme.json" ] } # vault{ #} env { } template { data = <