Check out the following links for more information:
- Wiki doc with a very detailed overview of deploying services on a swarm: https://docs.docker.com/v17.09/engine/swarm/services/
- How services work: https://docs.docker.com/engine/swarm/how-swarm-mode-works/services/
- Docker's getting started with swarm mode training: https://docs.docker.com/v17.09/engine/swarm/swarm-tutorial/