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
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 ?