traefik + ssl everywhere + swarm mode + docker-compose.yml #126
Replies: 2 comments 1 reply
-
I don't have much experience with swam so I moved it to discussions so maybe others can help out too! |
Beta Was this translation helpful? Give feedback.
-
As I said, I took your initial configuration and made a variation of it, trying to make it work on a Swarm:
In my 'data/traefik.yml' added the following:
Then I tried to redeploy it in one of the nodes of the Swarm, with If I revert back to the old docker-compose file and remove the line Can anyone help? |
Beta Was this translation helpful? Give feedback.
-
I've been following your step-by-step instructions on how to install traefik + portainer through Put Wildcard Certificates and SSL on EVERYTHING and also your related video https://www.youtube.com/watch?v=liV3c9m_OX8
Everything went fine but now I'm struggling to make it work after having created a Swarm with 3 Raspberry Pi's: I want traefik to work as proxy for containers running on any node of the swarm/cluster.
According to Traefik documentation, for it to work in a Swarm, it must be deployed on a master node (no problem since my 3 nodes are managers). Thus, I included this in the docker-compose.yml:
I've also created a new overlay network (instead of the regular bridge mode network you used, called proxy) and modify the docker-compose accordingly.
Besides, it seems that the labels must be nested one level deeper, under the
deploy
tag, thus:I've also modified the
data/traefiik.yml
file to include:I'm using your file as template, tried every possible combination but I still cannot make it work:
techno-tim.github.io/reference_files/traefik-portainer-ssl/traefik/docker-compose.yml
Lines 1 to 45 in ef6b8c9
Everytime, every possible change that has come to my mind leads me to a 404 File not found error page when the docker-compose file is deployed.
Can you shed some light on what changes would be needed in your template to make it work on a swarm mode cluster?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions