Deploying Our App on a Swarm
Explore deploying a Rails application on a Docker Swarm cluster with a hands-on approach. Learn how to configure and deploy multi-service stacks, use Docker commands to monitor and scale services, and verify the app running in a production-like environment. This lesson prepares you to manage app deployment and scaling effectively using Docker Swarm.
We'll cover the following...
We'll cover the following...
Deploy app onto single-node
With our newly created docker-stack.yml, we have a description of our app that Swarm can use. We are ready to deploy our app onto our (single-node) swarm. First, retarget Swarm by:
$ eval $(docker-machine env local-vm-1)
Command to deploy app
Now we can deploy our app with the command:
$ docker stack deploy -c docker-stack.yml myapp
Creating ...