I'm running a NodeJS
App with docker-compose. Everything works fine and I can see all my data by connecting to Mongo inside container. But when I connect to RoboMongo I don't see any data.
How can I deal with this problem?
There is another way. You can
docker ps
should show you your MongoDB container.docker inspect <mongo container id>
will print out complete information about that container. Look for IPAddress
in the end, that will give you the local IP of the container.Another sidenote: Make sure that you don't expose your mongodb service ports in any way (neither Dockerfile nor docker-compose.yml), cause that will make your database openly accessible from everywhere. Assuming that you don't have set up a username / password for that service you will be scanned and hacked soon.