Docker Compose هي أداة لتعريف وتشغيل تطبيقات متعددة الحاويات باستخدام ملف YAML واحد. بدلاً من تشغيل عدة أوامر docker run يدويًا، تصف جميع خدماتك (التطبيق، قاعدة البيانات، الذاكرة المؤقتة) في 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.
