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

  group "ui" {
    network {
      port "http" {
        to = 8080
      }
    }

    task "server" {
      driver = "docker"

      config {
        image = "adminer"
        ports = ["http"]
      }

      env {
        ADMINER_DEFAULT_SERVER = "mysql.service.consul"
      }

      service {
        name = "adminer"
        port = "http"

        tags = [
          "traefik.enable=true",
          "traefik.http.routers.adminer.entryPoints=websecure",
          "traefik.http.routers.adminer.middlewares=oidc-auth@file",
        ]
      }
    }
  }
}
