2018-11-27 16:42:04 +00:00
|
|
|
[global]
|
2017-11-30 11:18:03 +00:00
|
|
|
debug=true
|
|
|
|
|
|
|
|
[entryPoints]
|
|
|
|
[entryPoints.http]
|
|
|
|
address = ":8000"
|
|
|
|
|
|
|
|
[api]
|
2018-04-11 14:30:04 +00:00
|
|
|
|
2018-11-27 16:42:04 +00:00
|
|
|
[providers]
|
|
|
|
[providers.file]
|
2017-11-30 11:18:03 +00:00
|
|
|
|
2018-11-14 09:18:03 +00:00
|
|
|
[Routers]
|
|
|
|
[Routers.router1]
|
|
|
|
EntryPoints = ["http"]
|
|
|
|
Service = "service1"
|
|
|
|
Rule = "PathPrefix:/whoami"
|
2017-11-30 11:18:03 +00:00
|
|
|
|
2018-11-14 09:18:03 +00:00
|
|
|
[Routers.router2]
|
|
|
|
EntryPoints = ["traefik"]
|
|
|
|
Service = "service2"
|
|
|
|
Rule = "PathPrefix:/whoami"
|
2017-11-30 11:18:03 +00:00
|
|
|
|
2018-11-14 09:18:03 +00:00
|
|
|
[Services]
|
|
|
|
[Services.service1]
|
|
|
|
[Services.service1.LoadBalancer]
|
|
|
|
[[Services.service1.LoadBalancer.Servers]]
|
|
|
|
URL = "{{ .Server1 }}"
|
|
|
|
Weight = 1
|
2017-11-30 11:18:03 +00:00
|
|
|
|
2018-11-14 09:18:03 +00:00
|
|
|
[Services.service2]
|
|
|
|
[Services.service2.LoadBalancer]
|
|
|
|
[[Services.service2.LoadBalancer.Servers]]
|
|
|
|
URL = "{{ .Server2 }}"
|
|
|
|
Weight = 1
|