February 2019
Intermediate to advanced
240 pages
5h 25m
English
We now have a three-node cluster in DigitalOcean. The next step is to deploy our app onto it. With Swarm, we use the same process whether we’re deploying to a one-node cluster (as we did in the previous chapter), a three-node cluster (as we’re about to do), or even a twenty-node cluster.
We start by configuring our Docker CLI to point to one of the manager nodes in the swarm (it’s possible to have more than one manager). We can do this with docker-machine by setting the environment variables for the manager node:
| | $ eval $(docker-machine env do-manager-1) |
Then, deploying our application is just a matter of running the docker stack deploy command. Let’s do this now:
| | $ docker stack ... |