Reputation: 52
I'm trying to set up docker running mongodb with docker-express and deployd.
Mongodb seems to be working just fine but mongo-express keeps throwing me the same error. I tried almost everything with the parameter as I am quite sure that there's something wrong with the mongo-express configuration.
Here's my docker-compose.yml configuration for mongo and mongo-express:
The purple boxes contain the same credentials.
Here's a screenshot of the docker logs for the mongo-express container.
When I checked other similar issues, most of those where solved by modifying the MONGODB_URL, but in this case the URL seems just fine to me. Let me know if I'm wrong.
Upvotes: 0
Views: 483
Reputation: 5394
The containers didn't use the same docker network and the DNS record used for connecting to the mongo server was using the container name instead of the service name.
After checking these misconfigurations the issue was resolved
Upvotes: 1