Skip to content

Instantly share code, notes, and snippets.

@mafonso
Created November 12, 2015 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mafonso/b34cfa7a81a3f7cdec62 to your computer and use it in GitHub Desktop.
Save mafonso/b34cfa7a81a3f7cdec62 to your computer and use it in GitHub Desktop.
Consul template to scan all services
# Consul Services
{{range services}}
backend {{.Name}}
balance roundrobin
option redispatch
option forwardfor
{{range service .Name}} server {{.Name}} {{.Address}}:{{.Port}}
{{end}} {{end}}
#End Consul services
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment