Unable to use MongoDB docker container remotely

Hello Everyone,
I built a docker container using the docker-compose file, I built my container using the Dockerfile , and this supervisor, but i’m unable to use mongodb database in my app, i tried fetching the database using pymongo, here:
import pymongo
client = pymongo.MongoClient(“mongodb://test:test@myURL:27017/test”) # defaults to port 27017
db = client.test
a = db.movie.find()
for i in a:
print a

All the mentioned file can be found here
But it throws a connection refused error, what should i do to make it work??