I have an image which loads the data files and gives output by performing operations on the data files.
The data files are in the Leader node.
When I mount Leader node data files path to container path and when I deploy it in the docker-swarm cluster, all replicas are running in the Leader node and not spreading across all the nodes in the docker-swarm cluster.
Here is my docker-compose.yml file
version: "3.1" services: server: image: ramidavalapati/server:tag1 deploy: replicas: 5 restart_policy: condition: on-failure volumes: - /home/ram/Ram/Docker/git/data:/app/data ports: - 9090:80 networks: - abc networks: abc:
deploy : sudo docker stack deploy --compose-file docker-compose.yml server
So how can I spread all containers across docker-swarm cluster which can access data files which are in Leader node.