9: Multi-container apps with Compose
In this chapter, we’ll look at how to deploy multi-container applications using Docker Compose. We usually shorten it to just Compose.
We’ll split this chapter into the usual three parts:
- The TLDR
- The deep dive
- The commands
Deploying apps with Compose - The TLDR
Modern cloud-native apps are made of multiple smaller services that interact to form a useful app. We call this the microservices pattern.
A microservices app might have the following seven independent services that work together to form a useful application:
- Web front-end
- Ordering
- Catalog
- Back-end datastore
- Logging
- Authentication
- Authorization
Deploying and managing lots of small microservices like these can be hard. This is where Compose comes in to play.
Instead of gluing microservices together with scripts and long docker
commands, Compose lets you describe everything in a declarative configuration file. You can use this file to deploy it...