Most of the Meteor apps I write are deployed on our local intranet, and seeing how Galaxy as not been released, I've spent a bit of work on deployment tooling.
This is the current version of the deployment script we use, which may be of use to someone.
The server should:
- Have a working linux install.
- Let you log on via SSH, preferably passwordless since there's a few round-trips.
- Have nvm installed.
- Have pm2 installed.
And with an application there is some initial setup, the first time you publish an app:
- Update the configuration settings at the top of the script.
- Create a JSON configuration block for pm2. This is where you'd pass the environment variables (mongo url, port, smtp settings) and meteor settings. There's an example in the embedded gist.
- Create the deployment folder, the deployment backup folder.
- Manually start the process the first time, using something like
pm2 start pm2-testapp.json
Afterwards the deployment script will handle restarts.