NodeBB does not work with MongoDB Atlas connection string on initial setup page
-
Hey everyone,
I have the issue that I cannot set up NodeBB. I am trying to host NodeBB on Azure Container apps and I got a working instance running, but when I try to connect to my MongoDB Atlas instance via the uri, the database won't connect. There is an "getaddrinfo ENOTFOUND" error shown. When I do the setup locally with "./nodebb setup" and add the uri, then everything works smoothly and I can connect.
Does anyone know if I am missing something? Or does anyone have experience hosting nodeBB and mongoDB on Azure Container Apps. Any help on how I can achieve hosting the platform on Azure is would be very much appreciated.
Thank you!
-
@Gilles-Tanson said in NodeBB does not work with MongoDB Atlas connection string on initial setup page:
getaddrinfo ENOTFOUND
getaddrinfo ENOTFOUND
sounds very much like a DNS issue. Do you have network reachability from the host attempting to do the connection? For example, can you resolve hostnames to IP addresses? -
I get the same problem when I try to run the web installer of nodebb via localhost. The mongodb string starts with mongo+srv://... and I think this is already the issue.
I got the setup to work now by copying the config.json with the uri to mongodb atlas in the dockerfile to
/opt/config/
. I can now access the forum hosted on the container because the installer script is skipped from theentrypoint.sh
script.I am now faced with the task to make it possible to have this in a CI/CD setup, when the container needs to be rebuild. Is there no easier way to achieve this?