Mpublish.sh - one command way to publish meteor app into private web server


#1

hello,
i needed to write something like this and after that have shared code to github.
you can use this if you need, its ready and works good for me


#2

Mind sharing a link in your post?


#3

Why didn’t you use Meteor-up?


#4

sorry… https://github.com/lukiies/mpublish


#5

I’ve tried to use meteorup but it only support one meteor application in one server. mpublish provide many meteor application in one private debian server - and everything works independently.
If somebody want to publish many meteor application in one private server every app with other dns site name - this bundle of scripts is goal for that.
Of course - we will have excellent galaxy from meteor team. mpublish not trying to be to much safe and complicated - its as simple as we can do to make everything worked.

Simply - You write your meteor app, launch one single command and few minutes later your friends or clients can go to browser, write you application site dns name and … they can use your app.
You haven’t convert meteor app into nodejs app, follow that you haven’t tar & scp & untar & copy to wright dir & change rights & setup, create new proxy & and restart nginx server & start new nodejs VPS. Not every people known how to do this and especially nobody have enough time to do this even when we change our meteor apps.

I’ve looked at existing solution befour and i’ve not found.
also - you can use mpublish if you need, its ready and working fine

best way is to use ssh with authorized keys like usual (its comfortable and safe)


#6

Actually, Meteor UP does exactly what you describe. It’s just one command and it allows to run several Meteor applications.

Steps are:

  1. Write Meteor app locally
  2. mup deploy
  3. App is serving on your private server

If you want several Meteor instances, you just write different ports for them in mup.json and config nginx (or any other server) to proxy these ports:

server {
  server_name mysite.com;

  location / {
    proxy_pass http://localhost:3001/;
  }
}


server {
  server_name myanothersite.com;

  location / {
    proxy_pass http://localhost:3002/;
  }
}

P.S. Also Meteor UP can install mongodb, nodejs and other stuff you need. Also it can fetch logs from your server.

I can’t see any advantages of mpublish over mup


#7

I use mup with 4 applications on one server on digitalocean. It works pretty well.