You haven’t told us what quirks you’ve had with Meteor and Passenger, so that would be helpful to know if you’re looking for help.
Aside from that, I don’t understand what’s wrong. There are so many simple ways to deploy a Meteor application, and Passenger is a third-party manager which MDG cannot help you with. Here’s a “one-liner” you can run on your server to deploy Meteor if you use Git:
git clone git@github.com:user/repo.git app && \
cd $_ && \
meteor build /usr/share/nginx/html/ && \
rm -rf ../app && \
cd /usr/share/nginx/html && \
tar -xzf app.tar.gz && \
(cd bundle/programs/server && npm install) && \
mv bundle appName && \
rm app.tar.gz && \
node appName/main.js
You could replace node appName/main.js
with PM2 using pm2 start appName/main.js
which starts the application in the background and enables multithreading for it.
Now if you are going to be building larger applications, you will need a more sophisticated deployment method. I suggest going with CI (Continious Integration). That’s a whole other story but I’ve setup a fully working CI deployment method for Meteor that easily scales to other machines with a single addition to the CI .yml
file - if you’re interested I could write a post about it.
In the end, you definitely don’t need to use Passenger to handle your application if you just know how to configure your Nginx server block (virtual host). MUP and Phusion Passenger is essentially just tools to help Developers deploy, while large production deployments should either be handled by a System Administrator or a DevOps engineer.
My setup is kind of too advanced to be put into this post, but I essentially have a few servers all running CoreOS and all applications are contained within Docker. I have a private Git remote in a Docker container running Gogs (Go Git Service) and a CI platform in a Docker container running Drone CI. Drone runs all stages in Docker so this works hand-in-hand with CoreOS. I also run a private Docker Registry so I can easily build and publish my applications ready to be ran.
To trigger my deploy I simply push a new tag to my Git remote repository with something like git tag -a v1.0.0 -m "version 1.0.0" && git push origin v1.0.0
. Drone will then start testing my application in a Docker container, followed by building the application using meteor build
, followed by publishing the built Docker image to my private Docker Registry. Lastly it deploys it with docker pull
and starts/restarts the container depending on if it’s already running or not. This allows for zero-downtime deployment and hot-code push to work flawlessly.
This is already too much for this post but if you really want a detailed rundown on how I’ve got a really scalable, performant setup like this just tell me and I’ll create a post for it.