Introducing Docker Swarm

Learn how to make a single-node swarm.

Production environment concerns

Remember, we are treating this virtual instance as if it were a production instance for our application. Our objective is to start our application on this instance so that it can be used to service real requests. There are a number of ways you could do this. For example, you could use low-level Docker commands to start the various containers for our application.

However, having created a nice abstraction for our application with our docker-compose.yml file, that doesn’t sound appealing. If you are thinking that we could use Compose directly to manage our app on this new instance, you are close to where we’re headed.

The truth, though, is that Compose, as a tool, is really designed to help us during development. Once we get to a production environment, we have a whole different set of concerns that didn’t really affect us in development, such as:

  • How do we make our app resilient to failures?
  • How can we scale our application to handle varying load?
  • How do we deploy new versions of our application with no (or minimal) downtime for users?

Docker Swarm

Instead, Docker provides a container orchestrator, Swarm, for managing apps in production.

Get hands-on with 1200+ tech skills courses.