Skip to content

Instantly share code, notes, and snippets.

@liemle3893
Created April 1, 2020 11:34
Show Gist options
  • Select an option

  • Save liemle3893/0c8e3cc8dffde3255e72863e90838f1a to your computer and use it in GitHub Desktop.

Select an option

Save liemle3893/0c8e3cc8dffde3255e72863e90838f1a to your computer and use it in GitHub Desktop.

Revisions

  1. liemle3893 created this gist Apr 1, 2020.
    20 changes: 20 additions & 0 deletions Nomad Service Example.hcl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    service {
    name = "go-demo"
    port = "http"
    address_mode = "driver"
    tags = [
    "traefik.enable=true",
    "traefik.http.middlewares.strip-go-demo.stripprefix.prefixes=/go-demo",
    "traefik.http.routers.go-demo.entrypoints=http",
    "traefik.http.routers.go-demo.rule=PathPrefix(`/go-demo`)",
    "traefik.http.routers.go-demo.middlewares=strip-go-demo"
    ]
    check {
    name = "http"
    type = "http"
    port = "http"
    path = "/healthz"
    timeout = "2s"
    interval = "5s"
    }
    }