79362923

Date: 2025-01-16 20:05:06
Score: 1
Natty:
Report link

Solution 2025

I faced the same issue while connecting to mongo through mongo-express. Below are the steps i followed to get rid of the issue.

  1. First replace ME_CONFIG_MONGODB_SERVER with ME_CONFIG_MONGODB_URL.

It should look like "docker run -it -p 8081:8081 -e ME_CONFIG_MONGODB_URL=mongodb://root:root@{IP address of mongodb container} mongo-express " this will work if your mongo server is not running on a separate network.

IP Address can be found using "docker inspect {mongo server container id}"

  1. Alternatively, If your mongo server has been created using custom network.

Your command would be "docker run -it -p 8081:8081 -e ME_CONFIG_MONGODB_URL=mongodb://root:root@{Mongo server name (or) IP address of mongodb container} --network {network id} mongo-express ".

Network id can be found using "docker network ls". search for your mongo server.

Please Upvote if you find this helpfull.

Reasons:
  • Blacklisted phrase (0.5): Upvote
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Hafeez Mohammad