Starting new application using Docker Compose

I am following the course on Docker, and on the lesson “The Sample Web Application” when I run the “docker-compose up”, I get the following error.

Cannot start service db: Ports are not available: listen tcp bind: address already in use.

Can someone help me. Thanks in advance.

I solved the problem by changing the port for now from 27017 to 27018 in two files.
And, also, solved the permission issue for sh file.

Made it executable.

chmod +x

Additionally, if you are a mac user, change “./” to “sh ./” in docker-compose.yml