A YAML file comprising all the information about different services, networks, and volumes required to configure the Docker-based application

it is Docker-compose therefore creates several containers, hosts them and coordinates communication between them. 

Every single container exposes ports for the sake of communication among the containers.


Related Question