Wanted to share how we deployed our clustered App (using kadira’s Cluster package, with changes).
We didn’t like mupx as it used Docker and it’s a black box for us. Instead, we actually use the meteor server itself with its built-in MongoDB. Our application needs the DB to be on the same server for speed. This approach also allows us access to the DB remotely (say to add users or do cleanups):
- Created our own super simple startup script for pm2 (which runs with prod settings and --production)
- With a GitLab webhook, a script automatically pulls the latest master branch when there is an update
- At each pull, if there are changes it rebuilds automatically (given we are running meteor server)
It works great, especially as we are adding features almost daily (and fixing bugs as we move out of Beta) based on feedback.
The downside is that it takes 30 - 60s to rebuild, so it’s technically a downtime. When you think that mupx needs as long to make sure your app is deployed, it’s not so bad. We will later update our pm2 script to use the build feature (haven’t figured it out, the Meteor Guide / docs are not clear there yet).