How to persist containers' data in swarm mode when the container goes down?

look at glusterfs as distributed storage solution for docker containers across swarm