Pivert
Pivert

Reputation: 785

How to deploy a production meteor server in 2015?

Meteor has changed, and is missing a production deployment in docs.meteor.com.

I have a pretty nice working meteor app in dev mode. So I bundle it with the new command since bundle has been deprecated:

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

On the production server, I install the latest version of nodejs (currently 0.12), copy and decompress the build. The Mongo DB is on an other server, so I just redefine PORT, ROOT_URL, MONGO_OPLOG_URL and MONGO_URL environment variables.

But quickly end-up with the too frequently seen fibers missing error:

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:

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
├── [email protected]
root@server:/opt/meteor/authmonitor-src# meteor list-platforms
browser                                       
server

But I still have the same : Error: Cannot find module 'fibers'

Questions:

Thanks,

Upvotes: 5

Views: 3053

Answers (2)

David Weldon
David Weldon

Reputation: 64342

Is there an up to date manual on how to deploy meteor applications on local production server?

No, there is no official documentation. The community is waiting for MDG to release galaxy, which will be a paid hosting service for meteor.

Why / how should I install fibers module, and which version?

Based on what you wrote, there are a couple of things I see that could be problems:

After you untar the bundle you need to:

$ cd bundle/programs/server && npm install

You should not need to install any node modules globally in order for your app to work.

It's also recommended that you run the version of node appropriate for your meteor version. Have a look at the changelog and search for 'node'. At the time of this writing, the recommended version is 0.10.33.

hosting

If you are hosting somewhere fairly bare-bones like DigitalOcean or EC2, I'd recommend using Meteor Up for your deploys. If you prefer to do the sysadmin tasks yourself, I suggesting reading my related answers here and here.

Another popular hosting choice is modulus, becuase it's more full-service. You can read some tutorials here and here.

Upvotes: 1

Meteorpoly
Meteorpoly

Reputation: 938

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

Upvotes: 2

Related Questions