I recently applied the Meteor app to a drop of Digital Ocean with Ubuntu 14.04 x32. I used Meteor Up with this mup.json file:
{
Everything works great. I tested the website and everything works as it should. I also installed ssh keys with the server and can ssh to it without a password.
Now, although I need to access my server database remotely. I have some local data in the python shelf file in which I need to sow my database. I understand how to connect to the remote database using pymongo , but I'm trying to get the URI of the connection with meteor mongo --url http://mycorrecturl.com/ and it just returns this error:
Couldn't open a mongo connection: Site does not exist
What? What's going on here? I would expect it to ask for authentication, but just doesn't exist? Officially confused.
Your help is welcome in advance!
Update
I hunted in my server directories, trying to successfully run meteor mongo there, but despite the fact that I installed a meteorite with curl https://install.meteor.com | /bin/sh curl https://install.meteor.com | /bin/sh , it just always says that I am not in the project meteor directory. Even the hidden .meteor directory was apparently not a project directory.
Update
I looked more closely at the Meteor Up docs and it says the following:
You cannot access MongoDB from the outside of the server. To access MongoDB shell, you first need to log in to your server via SSH and then run the following command.
mongo appName
I tried this and it works, but it is not very good. I need to have access to the database remotely. Is it just not possible when deploying Meteor Up?
One of the answers below seems to suggest that by setting MONGO_URL in my env object, I will basically manually tell the database which url to respond to. It's right?
Update
Meteor Up docs say the following:
<username> - database name
So, according to one of the answers, I edited my mup.json to include this:
// Configure environment "env": { "ROOT_URL": "http://localhost/", "MONGO_URL": "mongodb://root:mypassword@127.0.0.1:27017/meteor" // My appName is "meteor", so that is the name of the database as well. }
When I do mup deploy with these variables, the deployment fails. Here is the first part of the error (if you want the rest to leave me information):
/usr/lib/node_modules/wait-for-mongo/bin/wait-for-mongo:14 throw err;
When I use mup reconfigure , it does not fail, but then the website simply cannot be found at its URL. It seems to me that MONGO_URL not a control mechanism, but simply a pointer to an external database such as mongohq.
I think I will have no choice but to resort to the mongo appName and the python ssh library, but I would like to find a way to directly access my database remotely and continue to use Meteor Up.