Ankur Soni
Ankur Soni

Reputation: 6018

Better way to deploy Meteor on own VPS than to Just Install

Scenario

  1. I purchased a VPS from Hostgator (which is CentOS) to create a new project on Meteor and pointed my domain to a folder X where i want to deploy Meteor. I logged in to my server using "root" login and installed meteor at X.
  2. When I gave "meteor --version" command, it gave me perfect output "Meteor 1.4.4.1"
  3. I deployed basic task example available on meteor site to my website location and manually added "meteor add reactive-var" and gave command "meteor"
  4. The project is live at "xyz.com:3000" (giving port is weird, how to get rid of this?).

My Question:

  1. Is this the way to deploy meteor on the live server? OR mandatorily I'll have to use "zodern/meteor-up".
  2. What is the difference between Simple Installation on live server and using zodern/meteor-up

UPDATED

When I used mup, created folder ".deploy" in meteor project, I ran command "mup init", I edited mup.json, Then I ran command "mup setup". But it rather gave me an error like this;

D:\sample\.deploy>mup.cmd setup

Started TaskList: Setup Docker
[playandearn.in] - Setup Docker
[playandearn.in] x Setup Docker: FAILED

        -----------------------------------STDERR-------------------------------
----
        stdin: is not a tty
        bash: line 7: docker: command not found
        rm: cannot remove `/var/lib/dpkg/lock': No such file or directory
        rm: cannot remove `/var/cache/apt/archives/lock': No such file or direct
ory
        sudo: dpkg: command not found
        sudo: apt-get: command not found
        -----------------------------------STDOUT-------------------------------
----
        ------------------------------------------------------------------------
----

Upvotes: 0

Views: 226

Answers (2)

Arshpreet Wadehra
Arshpreet Wadehra

Reputation: 1023

You can use zodern/meteor-up

Install mup(npm package)

Browse to project directory and run mup init

If you are on windows then use mup.cmd like mup.cmd setup

After preparing config file then

mup(.cmd) deploy

Upvotes: 1

Achal Agrawal
Achal Agrawal

Reputation: 161

What you are now doing is the incorrect way of deploying meteor. You don't really need to install meteor on your server, just on your developing machine.

  1. No. It isn't the way to deploy meteor on a live server. And there are multiple ways of deploying a meteor application as given here. But for your use case, mup will be the easiest.

  2. The simple installation is actually designed for development mode and not for a realtime production situation. As per the official guide, this mode watches source code files, exchanges data with package server and does a lot more than just running the app, leading to unnecessary computing resource wasting and security issues. While meteor up is specifically designed for production setup.

Upvotes: 1

Related Questions