Options for config storage in Swarm (File/Consul/etc)

We began piloting Traefik and Consul within Swarm until a concern was raised that Consul might be ephemeral in the sense that if the container hosts where Consul was deployed were destroyed, it wouldn't be rescheduled on other hosts. Sort of a niche scenario but we want to due our due diligence here...

It seems that within Swarm, options include:

  • Use a file config, but we must provide a process of syncing the file across all container hosts
  • Use a key-value store such as Consul on the same container hosts as Traefik

What (viable) options are there for making the configuration more durable/immutable? For example:

  • Can the file config be directed to a fixed NFS source (and how easily is this done? How common?)
  • Can a key-value store solution (i.e. Consul) be deployed on a separate set of container hosts that can be called via IP, or must these solutions share the same hosts/Swarm cluster?

Some of these questions might be a bit...unusual....but we want to address the concerns that were raised and due our due diligence here. Thanks in advance!

I may have answered my own question...

Based on the example below it looks like we can run Consul anywhere as long as we reference the IP as shown below. Is my understanding correct? Thanks

traefik:
image: traefik:<stable version from https://hub.docker.com/_/traefik>
command: --consul --consul.endpoint=127.0.0.1:8500