How to back up the road docker service configuration for disaster recovery

I have multiple servers running like a swarm using docker roaming mode. There are several (5+) stacks in the swarm, each with its own docker-compose.yml files.

Basically I use docker stack deployment to manage my stacks (editing my docker-compose.yml and then deploying so the composable files remain a true reflection of the current configuration). The downside to this is that any changes I make directly to the service are lost on the next deployment, and this prevents me from using all the tools like the portainer to their fullest.

In an ideal world, I would like to export all of my current configuration to a collection of docker-compose.yml files, allowing me to manage any discrepancies between my current configuration and my current configuration.

I can see that I could collapse my own using some shell scripts, docker-check -f and some templates, but I would have to save it all myself.

Are there tools or libraries to support my use?

+4


source to share


1 answer


The docker-compose.yaml file is part of your application and must be kept under source control following the Infrastructure as Code logic.



However, at DockerCon 19, server side support for Swarm was just announced. This way, you will have a working solution in a few weeks or months.

0


source







All Articles