Unable to connect to linked container

I am using the meteord container with the official mongodb linked through composer.
My docker-compose.uml is as follows.

mongo:
  image: mongo
web:
  build: .
  ports:
   - "8080:80"
  volumes:
   - .:/code
  links:
   - mongo
  environment:
   MONGO_URL: mongodb://mongo/mydb

docker-compose up
results in…
Error: failed to connect to [mongo:27017]

Not sure why this is the case. Any help would be appreciated.

1 Like