I am trying to set up the dynamic configurations for the traefik with docker compose file, but I am not able to figure out that where i am doing wrong.
btw, I was using only docker compose first then I make separate files for the configurations in there in the labels field I was using this line to reach out my bll service:
Currently you have Traefik and target service in the same Docker compose file. For that situation you probably should use providers.docker and labels - the target IP of the target container is set automatically in that case.
If you instead want to create manual routers and services, you can do that, too. Use providers.file with watch to reload dynamic config file after change.
In both cases you should define a rule with Host() to match.
Check with a touch on the dynamic file inside the Traefik container if an update is recognized.
In the general Docker forum I have seen complaints that some file changes are not recognized inside a container. Not sure if a solution was to only share single file or full directory.
Having this issue in traefik 2.11.
I'm having exactly the same issue running docker swarm and deploying traefik via Portainer. According to the documentation, it is suggested to use directory instead of the filename property. Any feedback is appreciated.
Just to overcome the issue I manually update the services through Portainer.
btw I tried with both the option, I put only file as well as whole directory on watch, also that changes are getting reflected inside the traefik container. but it will work based on the older configurations not the new one.
is there any reload or any other options that can reload the traefik and make it work according to new changes.!!?
Well I have a similar problem.
On my end if I go inside the container and change the dynamic config file, traefik will update, but if I try editing the file on the host, in my case its windows server, the file will be updated inside the container but traefik won't recognize this change.