Lesson 3.3

Docker Compose for local stacks

Compose declares your services, their networks, and their volumes in a single file, so a new contributor gets a running application and database with one command instead of a page…

14mBeginner16.7k students

Overview

The whole stack in one command

Compose declares your services, their networks, and their volumes in a single file, so a new contributor gets a running application and database with one command instead of a page of setup instructions.

Dependencies need care. Waiting for a container to start is not the same as waiting for the database inside it to accept connections — depend on a health check, not on start order.

Override files keep one base definition and layer environment-specific changes on top, which avoids three files that have quietly diverged.

In this lesson you will:

  • Describe several services in one file
  • Order startup with health conditions
  • Override configuration per environment

Resources

Previous Lesson
Next Lesson
Docker Compose for local stacks — Docker Essentials — Vertex