First of all, I know that DigitalOcean has a managed MongoDB service, but the client I work with wants to host their database using MongoDB Atlas. I setup a Node app using DO App platform and successfully connecting the subdomain.
I then got the IP address of the server using
ping api.mydomain.com. I proceeded to add this IP address to MongoDB Atlas in the network access tab, but the app still fails to connect the the database on MongoDB Atlas.
I used the same connection string locally using MongoDB Compass and everything works, which leads me to believe that the IP address I am using for the DO server is incorrect.
Has anyone else been able to hook these two services up? All help appreciated. Thank you in advance.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
As of the time being the DigitalOcean App Platform does not come with a static IP address.
It looks like someone has had the same idea before and has posted it on our Product Ideas board. The best thing to do would be to head over and add your vote to it, as well as adding any additional information in the comments for exactly what you’d like to see implemented!
Indeed as you mentioned, for the moment, you could use a Managed MongoDB cluster which you could secure/lock down using the Trusted Sources functionality.
Hope that helps!