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.
