What is Docker Compose?

๐Ÿ”น The Problem

Normally, when you use docker run, you start one container manually โ€” for example:

docker run -d -p 5432:5432 postgres
docker run -d -p 3000:3000 my-backend

Thatโ€™s fine for testing,

but real-world apps have multiple containers โ€”

backend, database, redis, frontend, etc.

Manually running each with docker run, linking networks, passing environment variables, etc., becomes messy and hard to manage.


๐Ÿ”น The Solution โ†’ Docker Compose

Docker Compose is a tool that lets you:

So you can do:

docker compose up

and Docker will: