hi
i saw some discussions on this topic(https://github.com/moby/moby/issues/26259, Data(base) persistence in docker swarm mode). It seems that the best way at this point is to deploy each db instance as a separate service and have a proxy to manage it.
Regards
Sreenivas