consul 和 docker swarm 配置后端是否兼容?
我的要求是我需要将 N 个 traefik 容器作为 docker 服务启动,它们通过 docker swarm 获取动态前端/后端,但我还需要所有 N 个 traefik 容器使用共享的 ACME 配置(即来自 consul)。
我希望前端/后端信息应该来自 docker swarm,而 ACME 配置应该来自 consul。就任何其他静态 traefik 配置而言,如果它来自静态文件,我很好,但这对于 ACME.json 作为文件通过 volumne 确实不起作用,因为如何管理写入锁定?我看到的唯一选择是 consul KV 商店。
我看到的问题是这种设置是不可能的?
Traefik 版本 v1.3.0 构建于 2017-05-31_05:48:42PM
将我的 TOML 配置上传到 consul KV,如下所示:(存储在 consul 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 服务,每个服务都使用相关标志启动
...
--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。