job "hello-world" { group "servers" { network { port "www" { to = -1 } } service { name = "hello-world" port = "www" tags = [ "traefik.enable=true", "traefik.http.routers.hello.rule=PathPrefix(`/hello`)", "traefik.http.middlewares.strip-hello.stripPrefix.prefixes=/hello", "traefik.http.routers.hello.middlewares=strip-hello", ] check { name = "alive" type = "tcp" port = "www" interval = "10s" timeout = "2s" } } # Tasks are individual units of work that are run by Nomad. task "web" { # This particular task starts a simple web server within a Docker container driver = "docker" config { image = "busybox:1" command = "httpd" args = ["-v", "-f", "-p", "${NOMAD_PORT_www}", "-h", "/local"] ports = ["www"] } template { data = <<-EOF