Docker Compose एक एकल YAML file का उपयोग करके multi-container applications को परिभाषित और चलाने का एक tool है। कई docker run commands मैन्युअल रूप से चलाने के बजाय, आप अपनी सभी services (app, database, cache) को docker-compose.yml में वर्णित करते हैं और उन्हें एक command के साथ एक साथ शुरू करते हैं।
Compose जिस समस्या को हल करता है
A real app often has MULTIPLE containers: a web app + a database + a cache + ...
→ manually running each with docker run (ports, networks, volumes, env, dependencies)
is tedious, error-prone, and hard to reproduce/share
→ Compose defines the WHOLE stack in one file → start it all with one command.
