I'm using Traefik in an AWS ECS cluster with the file directive to load certificates as they are created dynamically. However, Traefik doesn't seem to be processing the updates. Below is my toml configuration I'm using for testing. As you can see, I'm using the [file] directive to watch a directory that has toml files added to it when a new certificate is created.
When I add new toml files to the directory Traefik doesn't update??? Yet if I restart the service in AWS ECS Traefik loads the configuration just fine. Why doesn't it update dynamically???
defaultEntryPoints = ["http", "https"] [ecs] clusters = ["dev"] watch = true refreshSeconds = 15 exposedByDefault = true region = "us-west-2" [entryPoints] [entryPoints.http] address = ":80" compress = true [entryPoints.https] address = ":443" [entryPoints.https.forwardedHeaders] trustedIPs = ["127.0.0.1/32", "10.75.0.0/16"] [entryPoints.https.tls] [entryPoints.https.proxyProtocol] trustedIPs = ["127.0.0.1/32", "10.75.0.0/16"] [entryPoints.https.tls.defaultCertificate] certFile = "/certs/dwsites.ca/fullchain.pem" keyFile = "/certs/dwsites.ca/privkey.pem" [file] directory = "/etc/traefik/certs/" watch = true
Below is an example of one of the files in the directory that Traefik should be watching for changes and updating itself automatically. It's a dynamic certificate definition.
[[tls]] entryPoints = ["https"] [tls.certificate] certFile = "/certs/domain.com/fullchain.cer" keyFile = "/certs/domain.com/domain.com.key"