-
Notifications
You must be signed in to change notification settings - Fork 394
Migrating from meteor.sh
As long as you are on an Ubuntu 12.04+ system, migrating from netmute/meteor.sh is pretty straightforward.
-
Configure
mup.json
andsettings.json
according to the README. -
SSH into your server. You should deploy your app to a test server or virtual machine using
meteor.sh
first so that your production app doesn't have unnecessary downtime if something goes wrong. Run these steps against that one first, and then against production. You will need a little bit of production downtime (because you have to reinstall MongoDB), but probably not more than a few minutes. -
Back up your current MongoDB database. The following command will probably work (if you are not running on the default port or
meteor.sh
database name, then also use--host
and/or change the argument to--db
)mongodump --db meteorapp --out /path/to/backup/folder
-
Stop your app.
forever logs # Find the one with main.js, probably 0 or 1 forever stop <number> # where <number> is the number that is your app
You can also just
pkill forever
, but I recommend stopping just to let MongoDB calm down and not get into a state where you have to repair it. -
SSH in to server, and run the following with
sudo
or asroot
:apt-get remote mongodb mongodb-clients
Don't worry, you won't lose any data.
-
Set up the server for Meteor-UP. mup setup
-
Deploy the application using Meteor-UP. mup deploy
-
Your app should now be running. I encountered the MongoDB needing repair once, but I'll leave that explanation to the documentation. Just make sure you run --repair as the
mongodb
user if you need to, or chown -R the files in the MongoDB directory (I think it's/var/lib/mongodb
) back to that user after repairing them! -
You've now migrated to Meteor-UP, and your settings and environment variables have become much easier to manage. You can even commit them into a private repository since the Meteor-UP directory lives outside of your application! Happy deploying!