Я проверяю новые возможности Traefik v2
И по какой-то причине я не могу установить переменные Providers.Docker из traefik toml conf.
Значения прямо в разделе «Поставщики» работают, но Providers.Docker игнорируются.
Мой пример файла toml:
[Global]
Debug = true
CheckNewVersion = true
SendAnonymousUsage = false
[API]
Dashboard = true
[Providers]
ProvidersThrottleDuration = 999
[Providers.Docker]
UseBindPortIP = true
Из логов при запуске Traefik сбрасывает статический conf:
Как видите, глобальные API-провайдеры загружены, но Providers.Docker игнорируется?
Любая подсказка, что я делаю не так?
time="2019-04-15T16:02:13Z" level=debug msg="Static configuration loaded
{
"Global": {
"Debug": true,
"CheckNewVersion": true,
"SendAnonymousUsage": false
},
"ServersTransport": {
"InsecureSkipVerify": false,
"RootCAs": null,
"MaxIdleConnsPerHost": 200,
"ForwardingTimeouts": null
},
"EntryPoints": {
"http": {
"Address": ":80",
"Transport": {
"LifeCycle": {
"RequestAcceptGraceTimeout": 0,
"GraceTimeOut": 10000000000
},
"RespondingTimeouts": {
"ReadTimeout": 0,
"WriteTimeout": 0,
"IdleTimeout": 180000000000
}
},
"ProxyProtocol": null,
"ForwardedHeaders": {
"Insecure": false,
"TrustedIPs": null
}
},
"traefik": {
"Address": ":8080",
"Transport": {
"LifeCycle": {
"RequestAcceptGraceTimeout": 0,
"GraceTimeOut": 10000000000
},
"RespondingTimeouts": {
"ReadTimeout": 0,
"WriteTimeout": 0,
"IdleTimeout": 180000000000
}
},
"ProxyProtocol": null,
"ForwardedHeaders": {
"Insecure": false,
"TrustedIPs": null
}
}
},
"Providers": {
"ProvidersThrottleDuration": 999000000000,
"Docker": {
"Constraints": null,
"Watch": true,
"Endpoint": "unix:///var/run/docker.sock",
"DefaultRule": "Host(`{{ normalize .Name }}`)",
"TLS": null,
"ExposedByDefault": true,
"UseBindPortIP": false,
"SwarmMode": false,
"Network": "",
"SwarmModeRefreshSeconds": 15
},
"File": null,
"Marathon": null,
"Kubernetes": null,
"KubernetesCRD": null,
"Rest": null
},
"API": {
"EntryPoint": "traefik",
"Dashboard": true,
"Statistics": null,
"Middlewares": null
},
"Metrics": null,
"Ping": null,
"Log": null,
"AccessLog": null,
"Tracing": null,
"HostResolver": null,
"ACME": null
}
Мой файл создания докера:
version: '2'
networks:
domain:
external:
name: domain
services:
traefik:
image: traefik:v2.0
networks:
- janier
command: --api --providers.docker
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/traefik/traefik.toml:/etc/traefik/traefik.toml
gogs:
image: gogs/gogs
networks:
- domain
labels:
- "traefik.http.routers.gogs.rule=Host(`gogs.domain`)"
- "traefik.port=3000"
volumes:
- /opt/docker/volume/gogs:/data