job "whoami" {
  datacenters = ["alo"]

  group "who" {
    network {
      port "http" { }
    }

    task "whoami" {
      driver = "docker"
      config {
        image = "traefik/whoami"
        ports = ["http"]
        args = [
          "--port=${NOMAD_PORT_http}",
        ]
      }
      service {
        name = "whoami"
        port = "http"
        tags = [
          "traefik.enable=true",
          "traefik.http.routers.whoami.rule=Host(`test.alo.land`)",
          "traefik.http.routers.whoami.entryPoints=websecure",
          "traefik.http.routers.whoami.middlewares=oidc-auth@file",
        ]
      }
    }
  }
}
