Traefik Support of Docker Swarm and Setup & Configuration in Traefix 2.x

Question 1: Is Docker Swarm, still a future concept in use for traefik Proxy?

Question 2: If Docker Swarm is a future concept, how does a smart setup look like for traefik Proxy?

Being quite new in using Traefik Proxy, I am at the moment setting up a setup with Traefik between two physical hosts. After running Traefik Proxy in a single host mode in step 1, this introduction configuration running already makes use of the following configuration files in parallel with the Docker container for Traefik:

.htpasswd - this contains encrypted password to access Traefik dashboard.

traefik.yml - this is the configuration file where we regulate the "global" stuff that applies to Traefik itself and all containers managed with it.

middleware.yml - this is where we put info about http/https forwarding, header data and the minimum version of TLS that Traefik is allowed to use. Basically, we create functions in this file that we can access later in the container definitions with one line. This will save us some typing :wink:

acme.json - this is where we will later put all the certificates that Traefik receives from Let's Encrypt.

docker-compose.yml - with this file the Traefik container will be configured, started and connected to our host system.

/var/log/traefik.log - we will export the Traefik logs locally to the host so that we can quickly view them and back them up using our backup scripts.

NOW I'd like to add more hosts and use Docker Swarm. Coming so far I assume that a setup like the following - using 5 different - hosts could make sense:

Infrastructure Component Function
1. Host Docker Swarm Manager Manage the Swarm container, networks, etc.
2. Host App-Host Swarm Worker - provides the app and uses traefik to connect from the public network to the services.
3. Host DB-Host Swarm Worker - DB-master
4. Host DB-Host Swarm Worker - DB Replica
5. Host NFS-Host Not in Swarm - provides nfs shares for data storage.

The Network File System (NFS, also Network File Service) - is a protocol that provides access to files over a network.|

What's the best advice on Docker Swarm Configuration Setup for this? I wonder if I can still rely on Docker - Traefik which is related to trafik V. 1.7 ?

Hello @Sascha-Block

Thanks for using Traefik and asking a question in our community forum.

Answering your question, Traefik is compliant with most of the popular cluster technologies such as Kubernetes, Docker Swarm, Docker and Nomad. Integration with Docker Swarm is stable and ready to use for the production use cases. You can build your stack using those technologies, so you can receive support from the community or contacting Traefik Labs directly in case of issues.

The latest stable Traefik Proxy is 2.5.2 and highly recommend reviewing our documentation and to see what are the latest feature. The link you shared is for 2.5, so it is updated, but if you have found anything that might be improved, please let us know. You can also contribute to the docs and to the project itself, just open PR on our repo. GitHub - traefik/traefik: The Cloud Native Application Proxy

Regarding the architecture it all depends of your business use case and what you are trying to achieve.

thank you, Jakub

Thx for your fast reply, that's a worthy orientation so far.

You only avoided to answer my second question " If Docker Swarm is a future concept, how does a smart setup look like for traefik Proxy?

Maybe you could state from traefik's point of view how docker swarm is to be judged as a mature tool for orchestration?

Judge it from aspects of functionality, interoperability and the future of Docker Swarm from traefik's future developments...