What is Docker Compose and why use it here?
Docker includes a tool called Docker Compose that helps you create multi container applications. We’ll use it to create two containers that will run nodebb and mongodb (named as such respectively). We’ll set nodebb to depend on mongodb container so it will wait for mongodb to run first. This whole docker-compose file lets us write docker run arguments in a config file so we can easily tweak stuff.
Benefits of Docker Compose
- Single host deployment – This means you can run everything on a single piece of hardware
- Quick and easy configuration – Due to YAML scripts
- High productivity – Docker Compose reduces the time it takes to perform tasks
- Security – All the containers are isolated from each other, reducing the threat landscape