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

  meta {
    uuid = uuidv4()
  }

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

    task "frontend" {
      driver = "docker"

      config {
        image = "pierrezemb/gostatic"

        ports = [ "http" ]

        args = [
          "-port=${NOMAD_PORT_http}",
          "-enable-health",
        ]

        volumes = [ "/data/services/velutrack/dist:/srv/http" ]
      }
    }

    service {
      name = "velutrack"
      port = "http"

      tags = [
        "traefik.enable=true",
        "traefik.http.routers.velutrack.entryPoints=websecure",
      ]
    }
  }
}
