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