mathias-onu / eclesia-worship

Web app that syncs with a shared Dropbox folder to manage and present songs.
https://eclesia-worship-5h7lh.ondigitalocean.app/home
GNU General Public License v3.0
3 stars 0 forks source link

Migrate database to MongoDB Atlas #102

Open mathias-onu opened 10 months ago

mathias-onu commented 10 months ago

Current approach: we will continue using DigitalOcean's Databases service for one month, analyze the costs, and then decide whether we should use MongoDB Atlas' services or not.

mathias-onu commented 10 months ago

Encountering an issue related to DigitalOcean: the App platform service (that we are using to deploy our web app) does not provide a static IP which can be added in the MongoDB Atlas IP whitelist. This means that the deployment server cannot connect to the production database in MongoDB Atlas (more details: https://www.digitalocean.com/community/questions/how-to-identify-an-app-static-ip-address-or-range). I will try to see what I can do...

mathias-onu commented 10 months ago

In MongoDB Atlas, I can allow any IP to connect to the database, but this is a severe security vulnerability... This is the only workaround I can think of right know... I will continue doing research on the issue and try to do it the right way (adding the production server's IP to the MongoDB Atlas IP whitelist). Any suggestions, @Denis-Onu ?

mathias-onu commented 10 months ago

ISSUE: MongoDB Atlas, Serverless tier (the one we are using to deploy the production database) does not support the "collation" method: can we refactor, @Denis-Onu ?

mathias-onu commented 10 months ago

So far, here are the problems we are facing (based on the following we need to decide which service we should use for the production database):

  1. DigitalOcean App Platform service does not provide a static IP (I need to further research this)
  2. I can allow connections from any IP in MongoDB Atlas, but this is a severe security vulnerability (would solve issue no. 1).
  3. MongoDB Atlas Serverless tier does not allow the "collation" method (only the Dedicated tier allows it, but it's too expensive)
mathias-onu commented 10 months ago

Problems i and ii from the above comment are solved: in order to find out the actual IP address of the production server run the following command in the app's console: dig +short myip.opendns.com @resolver1.opendns.com.

mathias-onu commented 10 months ago

Current solution: we will continue using DigitalOcean's Databases service for one month, analyze the costs, and then decide whether we should use MongoDB Atlas' services or not.

mathias-onu commented 9 months ago

@Denis-Onu , when deciding upon migration to MongoDB Atlas, please check the following docs: https://www.mongodb.com/docs/atlas/reference/serverless-instance-limitations/

mathias-onu commented 7 months ago

I just thought about it: maybe MongoDB Atlas' IP whitelist can accept domain names? If so, we could just enter there the domain name (which is something like eclesiaworship.com) and our DO Linux server will be able to access the database from MongoDB Atlas (maybe this article helps)