I want to use docker swarm with docker-compose file to deploy services in multiple worker node.
How can I attach service in each worker into an overlay network?
I have researched and saw that I just can user this command to join service to an overlay network
$ docker service create \ --replicas 3 \ --name my-web \ --network my-network \ nginx
Anyone can help me to do it with docker-compose file by using
**docker stack deploy** command?