2019-04-09 15:24:05 +00:00
|
|
|
[global]
|
2019-07-01 09:30:05 +00:00
|
|
|
checkNewVersion = false
|
|
|
|
sendAnonymousUsage = false
|
2019-04-09 15:24:05 +00:00
|
|
|
|
|
|
|
[log]
|
2019-07-01 09:30:05 +00:00
|
|
|
level = "DEBUG"
|
2022-11-21 17:36:05 +00:00
|
|
|
noColor = true
|
2016-02-01 10:07:05 +00:00
|
|
|
|
2019-04-15 09:14:05 +00:00
|
|
|
[entryPoints]
|
|
|
|
[entryPoints.web]
|
2018-11-14 09:18:03 +00:00
|
|
|
address = ":8000"
|
2016-02-01 10:07:05 +00:00
|
|
|
|
2019-07-15 08:22:03 +00:00
|
|
|
[providers.file]
|
|
|
|
filename = "{{ .SelfFilename }}"
|
2019-07-01 09:30:05 +00:00
|
|
|
|
|
|
|
## dynamic configuration ##
|
2015-10-12 06:44:56 +00:00
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.routers]
|
|
|
|
[http.routers.router1]
|
2019-01-30 15:24:07 +00:00
|
|
|
rule = "Host(`test.localhost`)"
|
2018-11-14 09:18:03 +00:00
|
|
|
service = "service2"
|
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.routers.router2]
|
2019-01-30 15:24:07 +00:00
|
|
|
rule = "Path(`/test`)"
|
2018-11-14 09:18:03 +00:00
|
|
|
middlewares = ["circuitbreaker"]
|
|
|
|
service = "service1"
|
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.middlewares]
|
2019-07-01 09:30:05 +00:00
|
|
|
[http.middlewares.circuitbreaker.circuitBreaker]
|
2018-11-14 09:18:03 +00:00
|
|
|
expression = "NetworkErrorRatio() > 0.5"
|
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.services]
|
2019-07-01 09:30:05 +00:00
|
|
|
[http.services.service1.loadBalancer]
|
|
|
|
[[http.services.service1.loadBalancer.servers]]
|
2018-11-14 09:18:03 +00:00
|
|
|
url = "http://172.17.0.2:80"
|
2019-07-01 09:30:05 +00:00
|
|
|
[[http.services.service1.loadBalancer.servers]]
|
2018-11-14 09:18:03 +00:00
|
|
|
url = "http://172.17.0.3:80"
|
2019-06-05 20:18:06 +00:00
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.services.service2]
|
2019-07-01 09:30:05 +00:00
|
|
|
[http.services.service2.loadBalancer]
|
|
|
|
[[http.services.service2.loadBalancer.servers]]
|
2018-11-14 09:18:03 +00:00
|
|
|
url = "http://172.17.0.4:80"
|
2019-07-01 09:30:05 +00:00
|
|
|
[[http.services.service2.loadBalancer.servers]]
|
2018-11-14 09:18:03 +00:00
|
|
|
url = "http://172.17.0.5:80"
|