I have a Docker Swarm running (spread over three nodes), and pulling images from my private dockerhub repo.
So I can have multiple web applications spread over the same swarm, I'm using Traefik as a proxy.
For each web application, I have a docker-compose.yml and launch it to the stack:
docker stack deploy -c example.yml example docker stack deploy -c exampletwo.yml exampletwo
The actual *.yml files are all stored in a home folder of one specific swarm manager node.
I don't feel like this is best practice, as I'm going to end up with:
/home/user/example.yml /home/user/exampletwo.yml /home/user/examplethree.yml etc
which seems messy in that they are all together and open to mistakes and loss. And all documenation I read always refers to just using docker-compose.yml; but that doesn't work when I have multiple (totally separate) web applications (I don't want to put all services into one main yml
as they are all fundamentally totally unrelated)
Is there a best practise way of doing this? I wonder if I'm missing something fundamental with how to get the yml file available on the node to docker stack deploy