job "traefik-no-service" {
  datacenters = ["dc1"]
  type = "service"

  group "traefik" {
    count = 1

    constraint {
      attribute = "${node.unique.name}"
      value     = "hcp1"
    }

    network {
      mode = "host"
      port "http" {
        static = 80
        host_network = "tailscale0"
      }
    }

    task "traefik" {
      driver = "exec"
      
      config {
        command = "/usr/local/bin/traefik"
        args = [
          "--api.dashboard=true",
          "--api.insecure=true",
          "--providers.file.directory=/tmp",
          "--entrypoints.web.address=:80"
        ]
      }

      resources {
        cpu    = 200
        memory = 128
      }
    }
  }
}
