是否可以使用docker swarm和consul后端的traefik配置?

时间:2017-06-09 14:27:45

标签: docker docker-swarm consul traefik

consul和docker swarm配置后端是否兼容?

我的要求是我需要启动N个traefik容器作为docker服务,在那里他们通过docker swarm得到他们的动态前端/后端但是我还需要所有N个traefik容器来使用共享的ACME配置(即源自领事)。

我希望它能使得前端/后端信息来自docker swarm,而ACME配置应该来自领事。对于任何其他静态traefik配置,我很好,如果它来自静态文件,但这实际上不适用于ACME.json作为文件通过volumne因为如何管理写入锁定?我看到的唯一选择是领事KV商店。

我看到的问题是这种设置是不可能的?

Traefik v1.3.0版本建立于2017-05-31_05:48:42 PM

将我的TOML配置上传到consul KV,看起来像这样:(存储在领事KV的“traefik-stage”根目录下)

defaultEntryPoints = ["http", "https"]

debug=true
logLevel="DEBUG"
InsecureSkipVerify=true

[web]
address = ":8080"

[web.statistics]

[entryPoints]
  [entryPoints.http]
  address = ":80"
  [entryPoints.https]
  address = ":443"
    [entryPoints.https.tls]

[acme]
acmeLogging=true
onDemand=true
entryPoint="https"
OnHostRule=true
caServer="https://acme-v01.api.letsencrypt.org/directory"
email="obgt.letsencrypt@my-domain.com"
storage="traefik-stage/acme/account"

# TRIED BOTH WITH AND WITHOUT
# THE DOCKER CONFIG LOADED INTO CONSUL
# AND AS command line flags.... to no avail
[docker]
swarmmode=true
domain="traefik"
watch=true

[[acme.domains]]
   main = "local1.com"
[[acme.domains]]
   main = "myapp1.my-domain.com"
   sans = ["myapp1-stage.my-domain.com"]
[[acme.domains]]
   main = "myapp2.my-domain.com"
   sans = ["myapp2-stage.my-domain.com"]

启动traefik:

docker service create \
--name traefik \
--constraint=node.role==manager \
--publish 80:80 \
--publish 8080:8080 \
--publish 443:443 \
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
--network my-net \
-e "CONSUL_HTTP_TOKEN=xxxxxx" \
traefik  \
--consul \
--consul.endpoint=my-consul.my-domain.com:8500 \
--consul.watch=true \
--consul.prefix="traefik-stage"

请注意!无论是在领事中还是在命令行标志中使用和不使用docker标志都尝试了无效:

--docker \
--docker.swarmmode \
--docker.domain=traefik \
--docker.watch 

接下来我启动了我希望traefik代理的其他N个docker服务,每个都启动了w /相关的标志

...
--publish :9000 
--label traefik.protocol=https 
--label traefik.port=9000 
--label traefik.frontend.rule='Host:myapp1.my-domain.com,myapp1-stage.my-domain.com' 
--label traefik.docker.network=my-net
--network my-net
...

请注意以上设置(在TOML文件中完全使用traefik配置,而不是在领事中)正常工作

您希望看到什么?

当我去http://localhost:8080/dashboard/#/时,我看到我的2个前端/后端通过traefik正确发现并正确设置,因为他们工作不带领事

我看到的是什么?

UI中没有任何内容,但是日志显示traefik确实从docker获取前端/后端信息并将其连接起来的证据。但是UI中没有显示任何内容,也没有任何实际路由适用于这些主机。

记录输出

2017-06-09T16:22:38.049816971Z time="2017-06-09T16:22:38Z" level=info msg="Traefik version v1.3.0 built on 2017-05-31_05:48:42PM"
2017-06-09T16:22:38.056705032Z time="2017-06-09T16:22:38Z" level=debug msg="Global configuration loaded {"GraceTimeOut":10000000000,"Debug":true,"CheckNewVersion":true,"AccessLogsFile":"","TraefikLogsFile":"","LogLevel":"DEBUG","EntryPoints":{"http":{"Network":"","Address":":80","TLS":null,"Redirect":null,"Auth":null,"Compress":false},"https":{"Network":"","Address":":443","TLS":{"MinVersion":"","CipherSuites":null,"Certificates":null,"ClientCAFiles":null},"Redirect":null,"Auth":null,"Compress":false}},"Cluster":{"Node":"1ae7b5d5-9382-4a67-b608-1e39e6fba1e5","Store":{"Store":{},"Prefix":"traefik-stage"}},"Constraints":[],"ACME":{"Email":"letsencrypt@my-domain.com","Domains":[{"Main":"local1.com","SANs":null},{"Main":"myapp1.my-domain.com","SANs":["myapp1-stage.my-domain.com"]},{"Main":"myapp2.my-domain.com","SANs":["myapp2-stage.my-domain.com"]}],"Storage":"","StorageFile":"/var/run/acme.json","OnDemand":true,"OnHostRule":true,"CAServer":"https://acme-v01.api.letsencrypt.org/directory","EntryPoint":"https","DNSProvider":"","DelayDontCheckDNS":0,"ACMELogging":true,"TLSConfig":null},"DefaultEntryPoints":["http","https"],"ProvidersThrottleDuration":2000000000,"MaxIdleConnsPerHost":200,"IdleTimeout":180000000000,"InsecureSkipVerify":true,"Retry":null,"HealthCheck":{"Interval":30000000000},"Docker":{"Watch":true,"Filename":"","Constraints":null,"Endpoint":"unix:///var/run/docker.sock","Domain":"traefik","TLS":null,"ExposedByDefault":true,"UseBindPortIP":false,"SwarmMode":true},"File":null,"Web":{"Address":":8080","CertFile":"","KeyFile":"","ReadOnly":false,"Statistics":{"RecentErrors":10},"Metrics":null,"Path":"","Auth":null},"Marathon":null,"Consul":{"Watch":true,"Filename":"","Constraints":[],"Endpoint":"my-consul.my-domain.com:8500","Prefix":"traefik-stage","TLS":null,"Username":"","Password":""},"ConsulCatalog":null,"Etcd":null,"Zookeeper":null,"Boltdb":null,"Kubernetes":null,"Mesos":null,"Eureka":null,"ECS":null,"Rancher":null,"DynamoDB":null}"
2017-06-09T16:22:38.056793712Z time="2017-06-09T16:22:38Z" level=info msg="Preparing server https &{Network: Address::443 TLS:0xc420065260 Redirect:<nil> Auth:<nil> Compress:false}"
2017-06-09T16:22:38.303980631Z time="2017-06-09T16:22:38Z" level=warning msg="ACME.StorageFile is deprecated, use ACME.Storage instead"
2017-06-09T16:22:38.304036333Z time="2017-06-09T16:22:38Z" level=info msg="Preparing server http &{Network: Address::80 TLS:<nil> Redirect:<nil> Auth:<nil> Compress:false}"
2017-06-09T16:22:38.304047560Z time="2017-06-09T16:22:38Z" level=info msg="Starting provider *docker.Provider {"Watch":true,"Filename":"","Constraints":null,"Endpoint":"unix:///var/run/docker.sock","Domain":"traefik","TLS":null,"ExposedByDefault":true,"UseBindPortIP":false,"SwarmMode":true}"
2017-06-09T16:22:38.304056909Z time="2017-06-09T16:22:38Z" level=info msg="Starting provider *server.WebProvider {"Address":":8080","CertFile":"","KeyFile":"","ReadOnly":false,"Statistics":{"RecentErrors":10},"Metrics":null,"Path":"","Auth":null}"
2017-06-09T16:22:38.304063376Z time="2017-06-09T16:22:38Z" level=info msg="Starting server on :443"
2017-06-09T16:22:38.304067569Z time="2017-06-09T16:22:38Z" level=info msg="Starting provider *consul.Provider {"Watch":true,"Filename":"","Constraints":[],"Endpoint":"myconsul.my-domain.com:8500","Prefix":"traefik-stage","TLS":null,"Username":"","Password":""}"
2017-06-09T16:22:38.304086381Z time="2017-06-09T16:22:38Z" level=info msg="Starting server on :80"
2017-06-09T16:22:38.304091503Z time="2017-06-09T16:22:38Z" level=debug msg="Node 1ae7b5d5-9382-4a67-b608-1e39e6fba1e5 running for election"
2017-06-09T16:22:38.304095943Z time="2017-06-09T16:22:38Z" level=info msg="Node 1ae7b5d5-9382-4a67-b608-1e39e6fba1e5 elected slave ♝"
2017-06-09T16:22:38.305221709Z time="2017-06-09T16:22:38Z" level=debug msg="Provider connection established with docker 17.03.1-ce (API 1.27)"
2017-06-09T16:22:38.316537086Z time="2017-06-09T16:22:38Z" level=debug msg="Filtering container without port and no traefik.port label traefik.1"
2017-06-09T16:22:38.318032177Z time="2017-06-09T16:22:38Z" level=debug msg="Validation of load balancer method for backend backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl failed: invalid load-balancing method ''. Using default method wrr."
2017-06-09T16:22:38.318079837Z time="2017-06-09T16:22:38Z" level=debug msg="Validation of load balancer method for backend backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl failed: invalid load-balancing method ''. Using default method wrr."
2017-06-09T16:22:38.318543316Z time="2017-06-09T16:22:38Z" level=debug msg="Configuration received from provider docker: {"backends":{"backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl":{"servers":{"server-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl-1":{"url":"https://10.0.3.3:9000","weight":0}},"loadBalancer":{"method":"wrr"}},"backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl":{"servers":{"server-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl-1":{"url":"https://10.0.3.7:9000","weight":0}},"loadBalancer":{"method":"wrr"}}},"frontends":{"frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com":{"entryPoints":["http","https"],"backend":"backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl","routes":{"route-frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com":{"rule":"Host:myapp1.my-domain.com,myapp1-stage.my-domain.com"}},"passHostHeader":true,"priority":0,"basicAuth":[]},"frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com":{"entryPoints":["http","https"],"backend":"backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl","routes":{"route-frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com":{"rule":"Host:myapp2.my-domain.com,myapp2-stage.my-domain.com"}},"passHostHeader":true,"priority":0,"basicAuth":[]}}}"
2017-06-09T16:22:38.318768669Z time="2017-06-09T16:22:38Z" level=debug msg="Last docker config received more than 2s, OK"
2017-06-09T16:22:38.318851649Z time="2017-06-09T16:22:38Z" level=debug msg="Creating frontend frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com"
2017-06-09T16:22:38.318862832Z time="2017-06-09T16:22:38Z" level=debug msg="Wiring frontend frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com to entryPoint http"
2017-06-09T16:22:38.318870901Z time="2017-06-09T16:22:38Z" level=debug msg="Creating route route-frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com Host:myapp1.my-domain.com,myapp1-stage.my-domain.com"
2017-06-09T16:22:38.318885668Z time="2017-06-09T16:22:38Z" level=debug msg="Creating backend backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:38.318890613Z time="2017-06-09T16:22:38Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:38.318894858Z time="2017-06-09T16:22:38Z" level=debug msg="Creating server server-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.3:9000 with weight 0"
2017-06-09T16:22:38.318899165Z time="2017-06-09T16:22:38Z" level=debug msg="Wiring frontend frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com to entryPoint https"
2017-06-09T16:22:38.318903534Z time="2017-06-09T16:22:38Z" level=debug msg="Creating route route-frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com Host:myapp1.my-domain.com,myapp1-stage.my-domain.com"
2017-06-09T16:22:38.318964111Z time="2017-06-09T16:22:38Z" level=debug msg="Creating backend backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:38.318969668Z time="2017-06-09T16:22:38Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:38.318974033Z time="2017-06-09T16:22:38Z" level=debug msg="Creating server server-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.3:9000 with weight 0"
2017-06-09T16:22:38.318978435Z time="2017-06-09T16:22:38Z" level=debug msg="Creating frontend frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com"
2017-06-09T16:22:38.318982839Z time="2017-06-09T16:22:38Z" level=debug msg="Wiring frontend frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com to entryPoint http"
2017-06-09T16:22:38.318987264Z time="2017-06-09T16:22:38Z" level=debug msg="Creating route route-frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com Host:myapp2.my-domain.com,myapp2-stage.my-domain.com"
2017-06-09T16:22:38.318991884Z time="2017-06-09T16:22:38Z" level=debug msg="Creating backend backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:38.318996168Z time="2017-06-09T16:22:38Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:38.319385909Z time="2017-06-09T16:22:38Z" level=debug msg="Creating server server-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.7:9000 with weight 0"
2017-06-09T16:22:38.319427537Z time="2017-06-09T16:22:38Z" level=debug msg="Wiring frontend frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com to entryPoint https"
2017-06-09T16:22:38.319449626Z time="2017-06-09T16:22:38Z" level=debug msg="Creating route route-frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com Host:myapp2.my-domain.com,myapp2-stage.my-domain.com"
2017-06-09T16:22:38.319461465Z time="2017-06-09T16:22:38Z" level=debug msg="Creating backend backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:38.319476110Z time="2017-06-09T16:22:38Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:38.319484326Z time="2017-06-09T16:22:38Z" level=debug msg="Creating server server-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.7:9000 with weight 0"
2017-06-09T16:22:38.319499644Z time="2017-06-09T16:22:38Z" level=info msg="Server configuration reloaded on :443"
2017-06-09T16:22:38.319505207Z time="2017-06-09T16:22:38Z" level=info msg="Server configuration reloaded on :80"
2017-06-09T16:22:38.617268318Z time="2017-06-09T16:22:38Z" level=debug msg="Cannot get key traefik-stage/alias Key not found in store, setting default traefik-stage"
2017-06-09T16:22:38.735038061Z time="2017-06-09T16:22:38Z" level=info msg="Node 1ae7b5d5-9382-4a67-b608-1e39e6fba1e5 elected leader ♚"
2017-06-09T16:22:38.735155690Z time="2017-06-09T16:22:38Z" level=info msg="Starting ACME renew job..."
2017-06-09T16:22:38.832338566Z time="2017-06-09T16:22:38Z" level=debug msg="Transaction aac18cfa-9e66-44c1-9ca4-0433e6d6e0bc begins"
2017-06-09T16:22:38.832743436Z time="2017-06-09T16:22:38Z" level=debug msg="Configuration received from provider consul: {}"
2017-06-09T16:22:38.832775050Z time="2017-06-09T16:22:38Z" level=debug msg="Last consul config received less than 2s, waiting..."
2017-06-09T16:22:38.922562919Z time="2017-06-09T16:22:38Z" level=debug msg="Cannot get key traefik-stage/alias Key not found in store, setting default traefik-stage"
2017-06-09T16:22:39.079982533Z time="2017-06-09T16:22:39Z" level=debug msg="Configuration received from provider consul: {}"
2017-06-09T16:22:39.080049684Z time="2017-06-09T16:22:39Z" level=debug msg="Last consul config received less than 2s, waiting..."
2017-06-09T16:22:39.103499147Z time="2017-06-09T16:22:39Z" level=error msg="Error calling Leadership listener: failed to acquire lock: Invalid key. Key must not begin with a '/': /var/run/acme.json/lock"
2017-06-09T16:22:39.166044562Z time="2017-06-09T16:22:39Z" level=debug msg="Cannot get key traefik-stage/alias Key not found in store, setting default traefik-stage"
2017-06-09T16:22:39.370791846Z time="2017-06-09T16:22:39Z" level=debug msg="Configuration received from provider consul: {}"
2017-06-09T16:22:39.370938439Z time="2017-06-09T16:22:39Z" level=debug msg="Last consul config received less than 2s, waiting..."
2017-06-09T16:22:41.374581362Z time="2017-06-09T16:22:41Z" level=debug msg="Waited for consul config, OK"
2017-06-09T16:22:41.374643174Z time="2017-06-09T16:22:41Z" level=debug msg="Creating frontend frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com"
2017-06-09T16:22:41.374688194Z time="2017-06-09T16:22:41Z" level=debug msg="Wiring frontend frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com to entryPoint http"
2017-06-09T16:22:41.374695851Z time="2017-06-09T16:22:41Z" level=debug msg="Creating route route-frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com Host:myapp1.my-domain.com,myapp1-stage.my-domain.com"
2017-06-09T16:22:41.374702925Z time="2017-06-09T16:22:41Z" level=debug msg="Creating backend backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:41.374733438Z time="2017-06-09T16:22:41Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:41.374741833Z time="2017-06-09T16:22:41Z" level=debug msg="Creating server server-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.3:9000 with weight 0"
2017-06-09T16:22:41.374839405Z time="2017-06-09T16:22:41Z" level=debug msg="Wiring frontend frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com to entryPoint https"
2017-06-09T16:22:41.374854017Z time="2017-06-09T16:22:41Z" level=debug msg="Creating route route-frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com Host:myapp1.my-domain.com,myapp1-stage.my-domain.com"
2017-06-09T16:22:41.375226321Z time="2017-06-09T16:22:41Z" level=debug msg="Creating backend backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:41.375243069Z time="2017-06-09T16:22:41Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:41.375250166Z time="2017-06-09T16:22:41Z" level=debug msg="Creating server server-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.3:9000 with weight 0"
2017-06-09T16:22:41.375256492Z time="2017-06-09T16:22:41Z" level=debug msg="Creating frontend frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com"
2017-06-09T16:22:41.375262419Z time="2017-06-09T16:22:41Z" level=debug msg="Wiring frontend frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com to entryPoint http"
2017-06-09T16:22:41.375272098Z time="2017-06-09T16:22:41Z" level=debug msg="Creating route route-frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com Host:myapp2.my-domain.com,myapp2-stage.my-domain.com"
2017-06-09T16:22:41.375278891Z time="2017-06-09T16:22:41Z" level=debug msg="Creating backend backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:41.375284443Z time="2017-06-09T16:22:41Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:41.375335382Z time="2017-06-09T16:22:41Z" level=debug msg="Creating server server-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.7:9000 with weight 0"
2017-06-09T16:22:41.375344359Z time="2017-06-09T16:22:41Z" level=debug msg="Wiring frontend frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com to entryPoint https"
2017-06-09T16:22:41.375350512Z time="2017-06-09T16:22:41Z" level=debug msg="Creating route route-frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com Host:myapp2.my-domain.com,myapp2-stage.my-domain.com"
2017-06-09T16:22:41.375356724Z time="2017-06-09T16:22:41Z" level=debug msg="Creating backend backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:41.375362361Z time="2017-06-09T16:22:41Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:41.375367938Z time="2017-06-09T16:22:41Z" level=debug msg="Creating server server-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.7:9000 with weight 0"
2017-06-09T16:22:41.375373661Z time="2017-06-09T16:22:41Z" level=info msg="Server configuration reloaded on :443"
2017-06-09T16:22:41.375379195Z time="2017-06-09T16:22:41Z" level=info msg="Server configuration reloaded on :80"
2017-06-09T16:22:53.337794486Z time="2017-06-09T16:22:53Z" level=debug msg="Filtering container without port and no traefik.port label traefik.1"
2017-06-09T16:22:53.339047817Z time="2017-06-09T16:22:53Z" level=debug msg="Validation of load balancer method for backend backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl failed: invalid load-balancing method ''. Using default method wrr."
2017-06-09T16:22:53.339101405Z time="2017-06-09T16:22:53Z" level=debug msg="Validation of load balancer method for backend backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl failed: invalid load-balancing method ''. Using default method wrr."
2017-06-09T16:22:53.339251375Z time="2017-06-09T16:22:53Z" level=debug msg="Configuration received from provider docker: {"backends":{"backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl":{"servers":{"server-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl-1":{"url":"https://10.0.3.3:9000","weight":0}},"loadBalancer":{"method":"wrr"}},"backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl":{"servers":{"server-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl-1":{"url":"https://10.0.3.7:9000","weight":0}},"loadBalancer":{"method":"wrr"}}},"frontends":{"frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com":{"entryPoints":["http","https"],"backend":"backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl","routes":{"route-frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com":{"rule":"Host:myapp1.my-domain.com,myapp1-stage.my-domain.com"}},"passHostHeader":true,"priority":0,"basicAuth":[]},"frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com":{"entryPoints":["http","https"],"backend":"backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl","routes":{"route-frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com":{"rule":"Host:myapp2.my-domain.com,myapp2-stage.my-domain.com"}},"passHostHeader":true,"priority":0,"basicAuth":[]}}}"
2017-06-09T16:22:53.339299039Z time="2017-06-09T16:22:53Z" level=info msg="Skipping same configuration for provider docker"
2017-06-09T16:23:08.335094957Z time="2017-06-09T16:23:08Z" level=debug msg="Filtering container without port and no traefik.port label traefik.1"
2017-06-09T16:23:08.336505132Z time="2017-06-09T16:23:08Z" level=debug msg="Validation of load balancer method for backend backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl failed: invalid load-balancing method ''. Using default method wrr."
2017-06-09T16:23:08.336551553Z time="2017-06-09T16:23:08Z" level=debug msg="Validation of load balancer method for backend backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl failed: invalid load-balancing method ''. Using default method wrr."
2017-06-09T16:23:08.336675752Z time="2017-06-09T16:23:08Z" level=debug msg="Configuration received from provider docker: {"backends":{"backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl":{"servers":{"server-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl-1":{"url":"https://10.0.3.3:9000","weight":0}},"loadBalancer":{"method":"wrr"}},"backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl":{"servers":{"server-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl-1":{"url":"https://10.0.3.7:9000","weight":0}},"loadBalancer":{"method":"wrr"}}},"frontends":{"frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com":{"entryPoints":["http","https"],"backend":"backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl","routes":{"route-frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com":{"rule":"Host:myapp1.my-domain.com,myapp1-stage.my-domain.com"}},"passHostHeader":true,"priority":0,"basicAuth":[]},"frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com":{"entryPoints":["http","https"],"backend":"backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl","routes":{"route-frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com":{"rule":"Host:myapp2.my-domain.com,myapp2-stage.my-domain.com"}},"passHostHeader":true,"priority":0,"basicAuth":[]}}}"
2017-06-09T16:23:08.336718473Z time="2017-06-09T16:23:08Z" level=info msg="Skipping same configuration for provider docker"

如果无法满足上述要求......此类要求的推荐设置是什么?即N traefik实例,使用共享配置,共享ACME,但来自docker的前端/后端。

1 个答案:

答案 0 :(得分:3)

请注意,这是由于UI中出现的问题:https://github.com/containous/traefik/pull/1757