Originally published on CodingCush .
Docker Compose is a tool that lets you run an application made of several Docker containers β for example a website, a database and a cache β from one simple text file called docker-compose.yml . Instead of starting every container by hand with long commands, you describe the whole setup once in that file and start everything together with a single command: docker compose up .
Why Does Docker Compose Exist?
Real applications are rarely one single programme. A typical small website needs at least three pieces working together: the web app itself, a database such as MySQL or PostgreSQL to store data, and sometimes a cache or a mail tool for testing. With plain Docker, you would have to create a network, then start each container separately with the right ports, volumes and environment variables typed out in full β every single time, in the right order, without a single typo.β¦