docker-compose.yml for Syncthing on swarm

Hello, I would use Syncthing for Persistent Distributed Filesystems in Docker. Is not clear to me if I need to create a docker-compose file with different syncthing services for each node I need to deploy, such as:

services:
  syncthing-1:
    volumes:
      - ./config/1:/root/.config/syncthing
   syncthing-2:
    volumes:
      - ./config/2:/root/.config/syncthing
  syncthing-3:
     volumes:
      - ./config/3:/root/.config/syncthing

Or if is enough in docker-compose one synching service only and replicate it on all nodes of swarm, something like:

services:
  syncthing:
    deploy:
      replicas: 5

I would prefer the second option, there is anyone can help on it showing me an example of docker-cpompose?

Thanks

This is crazy.

If you want a persistent distributed filesystem, use a persistent distributed filesystem, not some sync software to emulate a some limping variant of it that will have tons of edge cases and potentially lead to data loss.

For starters, one node losing data will nuke data on all other nodes… Doesn’t sound like a great property for a distributed filesystem…

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.