How to deploy a production meteorite server in 2015?

The meteor has changed and there is no production deployment at docs.meteor.com.

In dev mode, I have a pretty nice working meteorite app. Therefore, I will associate it with the new command as the package is deprecated:

meteor build ./build/ --architecture os.linux.x86_64 

On the production server, install the latest version of nodejs (currently 0.12), copy and unzip the assembly. Mongo DB is on a different server, so I just override the environment variables PORT, ROOT_URL, MONGO_OPLOG_URL and MONGO_URL.

But quickly end up with fiber deficiencies that are too common:

 module.js:338 throw err; ^ Error: Cannot find module 'fibers' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) ........... 

So here is what I tried:

  • npm install fiber@1.0.1 -g #, but it doesn’t work.
  • npm install -g fibers successfully and install version 1.0.5

Here is the situation:

 root@server :~# npm version { npm: '2.5.1', http_parser: '2.3', modules: '14', node: '0.12.0', openssl: '1.0.1l', uv: '1.0.2', v8: '3.28.73', zlib: '1.2.8' } root@server :~# npm ls -g | grep fibers β”œβ”€β”€ fibers@1.0.5 root@server :/opt/meteor/authmonitor-src# meteor list-platforms browser server 

But I still have the same: Error: Cannot find fiber modules

Questions:

  • Is there an updated guide to deploy meteorite applications on a local production server?
  • Why / how do I install the fiber module and which version?
  • exporting NODE_PATH = / usr / local / lib / node_modules / partially helped, but after installing with npm install xxx -g, the required modules, such as underscores and semver, end with another fiber error: "Error: the module was not registered by itself."
  • What would you recommend?

Thanks,

+5
source share
2 answers

Is there an updated guide to deploy meteorite applications on a local production server?

No, there is no official documentation. The community expects the MDGs to launch a galaxy that will become a paid hosting service for meteors.

Why / how do I install the fiber module and which version?

Based on what you wrote, there are several things that I see that may be problems:

After you unpack the kit, you need to:

 $ cd bundle/programs/server && npm install 

You do not need to install any node modules globally for your application to work.

It is also recommended that you run a version of node that matches your version of the meteor. Look at the change log and find "node". At the time of this writing, the recommended version is 0.10.33 .

hosting

If you place somewhere pretty bare bones like DigitalOcean or EC2, I would recommend using Meteor Up for your deployments. If you prefer to do the sysadmin tasks yourself, I suggest reading the following answers here and here .

Another popular hosting choice is modulus , because it is a more complete service. Here you can read several guides here and here .

+1
source

I would use Meteor Up , which automates a lot of things. Here is a video tutorial from Sacha

+2
source

Source: https://habr.com/ru/post/1213905/


All Articles