How can I setup NodeBB with MongoDB Atlas Cloud?
-
@pitaj I"m eventually using IBM Bluemix, but I'm just using Nodebb locally initially for development. MongoDB Atlas is the cloud database as a service I'm using.
What do you mean "Make sure that the updated config.json is checked into git if it's Heroku or similar." I am unfamiliar with git and how it works. How does the nodebb setup read from git?
-
If you're using it locally, you're not on Heroku or similar. Heroku is a cloud container provider, and they use a git repository as the way to deploy your site.
What
config.json
are you using before running./nodebb setup
? -
I'm modifying the config.json at the NodeBB folder level.
Changing it from:
"mongo": { "host": "host", "port": 27017, "username": "user", "password": "password", "database": "nodebb" }
to something like:
"mongo": { "uri": "Mongoatlas URI connection" }
If I change it after nodebb setup, it connects to the Mongodb Atlas cloud correctly. However the objects in the database are not properly setup\initialized.
So I need to run nodebb setup against the Mongodb Atlas server, but the setup keeps overwriting\using config.json defaults. -
Have you tried setting up a
config.json
file before running./nodebb setup
? I'm thinking something like this:- Create
config.json
with the mongo uri setting
{ "database": "mongo", "mongo": { "uri": "...." } }
./nodebb setup
- Create
-
I think your only other option is to take a dump of the database on your local machine and push it onto the remote database.