Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor Deployment to Galaxy MONGO_URL must be set in environment

I am attempting to deploy to Meteor Galaxy using Monglab as my backend DB. The Mongolab account is set up properly and the username and password are all working properly. I constantly get a MONGO_URL must be set in environment

My Code: settings.json

{
    "galaxy.meteor.com": {
        "env": {
        "ROOT_URL": "http://<myapp>.meteorapp.com/", 
        "MONGO_URL":"mongodb://<login>:<password>@ds012345.mlab.com:12345/<db>"
        }
    }
}

Deployment Command

$ meteor deploy <myapp>.meteorapp.com --settings <pathto>/settings.json

This is the error message I receive:

p67c 2016-03-27 08:41:09 04:00/app/bundle/programs/server/node_modules/fibers/future.js:245
p67c 2016-03-27 08:41:09-04:00  throw(ex);
p67c 2016-03-27 08:41:09-04:00  ^
p67c 2016-03-27 08:41:10-04:00 Error: MONGO_URL must be set in environment
p67c 2016-03-27 08:41:10-04:00 at Object.<anonymous> (packages/mongo/remote_collection_driver.js:36:1)
p67c 2016-03-27 08:41:10-04:00 at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:750:1)
p67c 2016-03-27 08:41:10-04:00 at new Mongo.Collection (packages/mongo/collection.js:102:1)
p67c 2016-03-27 08:41:10-04:00 at AccountsServer.AccountsCommon (accounts_common.js:23:18)
p67c 2016-03-27 08:41:10-04:00 at new AccountsServer (accounts_server.js:16:5)
p67c 2016-03-27 08:41:10-04:00 at Package (globals_server.js:5:12)
p67c 2016-03-27 08:41:10-04:00 at /app/bundle/programs/server/packages/accounts-base.js:1814:4
p67c 2016-03-27 08:41:10-04:00 at /app/bundle/programs/server/packages/accounts-base.js:1825:3
p67c 2016-03-27 08:41:10-04:00 at /app/bundle/programs/server/boot.js:242:10
p67c 2016-03-27 08:41:10-04:00 at Array.forEach (native)

Your advice and guidance is very much appreciated. Thank you.

like image 592
Lawyer_Coder Avatar asked Oct 19 '25 11:10

Lawyer_Coder


1 Answers

You need to specify to deploy to Galaxy by using the environment variable DEPLOY_HOSTNAME.

Otherwise it will try to deploy to the old Meteor hosting service, IIRC.

Try this:

DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy <myapp>.meteorapp.com --settings <pathto>/settings.json

like image 154
hexsprite Avatar answered Oct 21 '25 03:10

hexsprite



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!