Docker Compose เป็นเครื่องมือสำหรับการกำหนดและรัน แอปพลิเคชันแบบหลาย container โดยใช้ไฟล์ YAML เพียงไฟล์เดียว แทนที่จะรันคำสั่ง docker run หลายคำสั่งด้วยตนเอง คุณอธิบายบริการทั้งหมดของคุณ (แอป, ฐานข้อมูล, cache) ใน docker-compose.yml แล้วเริ่มทำงานพร้อมกันด้วยคำสั่งเดียว
ปัญหาที่ 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.
