I have problem with convert traefik from 1.7 to 2.5. I tried with migration tool but I get warning:
TLS on entry point "https" must be converted manually. See https://docs.traefik.io/routing/routers/#tls
The domain (docker.localhost) defined in the Docker provider must be converted manually. See https://docs.traefik.io/providers/docker/#defaultrule
Please help to convert.
traefik.toml
debug = true
logLevel = "DEBUG"
defaultEntryPoints = ["http", "https"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[[entryPoints.https.tls.certificates]]
certFile = "/etc/traefik/ssl/localhost.crt"
keyFile = "/etc/traefik/ssl/localhost.key"
[api]
[ping]
[docker]
domain = "docker.localhost"
exposedByDefault = false
docker-compose.service.yml
labels:
- "traefik.frontend.rule=Host:${D_HOST}${D_HOST_ADDITIONAL}"
- "traefik.docker.network=traefik"
depends_on:
docker-compose.traefik.yml
version: '3.5'
services:
traefik:
container_name: traefik
restart: always
image: traefik:2.5
command: --api
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./config/static/traefik.toml:/etc/traefik/traefik.toml
- ./config/ssl:/etc/traefik/ssl
networks:
- traefik
networks:
traefik:
name: traefik
My config:
[http.routers]
[http.routers.Router-1]
[https.routers]
[https.routers.Router-2]
[https.routers.Router-2.tls]
[[tls.certificates]]
certFile = "/etc/traefik/ssl/localhost.crt"
keyFile = "/etc/traefik/ssl/localhost.key"