Is it possible to just give label:
traefik.enable=true and control everything from file provider? I don't have any success yet, and I start to thin if this is even possible.
Please, help answer me this puzzle.
Or, maybe this is not a good practice to mix those between?
Here is my configuration working only by providers :
#docker-compose.yml for traefik
- /opt/docker/traefikV2/conf:/etc/traefik/conf # Here is the blackhole directory liked in traefik.yml where I put all my yml files
#traefik.yml mounted by "- /opt/docker/traefikV2/traefik.yml:/etc/traefik/traefik.yml" in docker-compose
#First file conf read by traefik need docker-compose restart if you modify this file
directory: /etc/traefik/conf/ # Blackhole directory with all providers files
#ATTENTION : certificate resolvers above can't work if declared in /etc/traefik/conf/provider.yml
#They work only if they are declared here in traefik.yml, first file read at start
#I spent about 8 hours to understand that.
Example for my teamspeak docker :
#docker-compose for teamspeak service :
# teamspeak #
# ts3.yml file in /opt/docker/traefikV2/conf
- address: "teamspeak:9987"
Hope it help
Thanks, this gives a bit more confidence that I could move all the configs away from comose files.
And this is surprise to me too that certs has to be defined in static not in dynamic part... Thanks for pointing this out
Using providers in files took a little bit more time to setup especially to understand that
certificatesResolvers can't be declared dynamicaly.
But I prefer that way instead of declaring rules in docker-compose that, i think, is not clear and lisible.
I only shown you one service behind traefik but I've configured this way 8 services TCP and UDP mixed and the best part is modifying providers without
docker-compose.yml restart to apply changes