I've a docker environment that I manage with Portainer.
I've created a docker-compose file with all my home service and I do update them in a portainer stack.
This stack contains a traefik proxy for all my services. I'm just wondering if there is a possibility to add an entry for the portainer instance, which was not declared in my docker-compose file(since the docker-compose file is deployed with portainer itself).
You should read the Traefik documentation, as static and dynamic config is very important to understand, you need to know which piece of config goes where, otherwise it does not work. Traefik is not plug and play.
In your static config (entrypoints, providers) you need to add a provider.file to load the dynamic config (which is usually done with labels), that looks roughly like this:
Just for my understanding, can I mix the things I've in my docker file and what will be inside this provider file? As this is only interesting for a few elements for me compared to all the docker images.
How do you refers things from one to the other? Like will I to refer multiple time the SSL resolver?
It's a pity that you cannot mix the label and the traefik.yml, but ok.
You have good point to add things globally, I love that, I will update my process.
My portainer was installed directly with the docker image, not docker compose, so I was tempted by the docker service approach, but it seems this is only for container on a swarm, I didn't find the --label-add on the docker update command.
Maybe I will re-start portainer with a docker-compose file, and that would do it? Even if traefik is not in the same docker-compose?