Pergunta

I am new to meteorjs. I created an app that I am uploading to server using Meteor UP (MUP). I have dedicated linux server with cPanel installed. I can access the server through SSH.

I have windows 7 on my local setup from where I am trying to deploy the app. I created a private key and am using it with MUP to deploy the app. But when I run mup setup in command prompt, it gives me the following error:

Meteor Up: Production Quality Meteor Deployments
------------------------------------------------


Started TaskList: Setup
[207.244.66.193] - Installing Node.js
[207.244.66.193] ? Installing Node.js: FAILED
        spawn ENOENT
Completed TaskList: Setup

Here is my mup.json file

{
  // Server authentication info
  "servers": [
    {
      "host": "xxx.xxx.xx.xxx",
      "username": "devmain",
      //"password": "password"
      // or pem file (ssh based authentication)
      "pem": "/Users/Jackal/Desktop/mup1"
    }
  ],

  // Install MongoDB in the server, does not destroy local MongoDB on future setup
  "setupMongo": true,

  // WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
  "setupNode": true,

  // WARNING: If nodeVersion omitted will setup 0.10.25 by default. Do not use v, only version number.
  "nodeVersion": "0.10.25",

  // Install PhantomJS in the server
  "setupPhantom": true,

  // Application name (No spaces)
  "appName": "myappname",

  // Location of app (local directory)
  "app": "/Users/Jackal/Desktop/app",

  // Configure environment
  "env": {
    "PORT": 3000,
    "ROOT_URL": "http://myapp.com"
  },

  // Meteor Up checks if the app comes online just after the deployment
  // before mup checks that, it will wait for no. of seconds configured below
  "deployCheckWaitTime": 15
}

Can someone please identify what I am doing wrong here?

Foi útil?

Solução

Since you are running cPanel, its highly likely that you are not running a debian based operating system, since it only support redhat based systems, since MeteorUP relies on the apt command, and thats only available on debian based systems, MeteorUP will not work.

To run your app in production you can use systemd:

[Service]
ExecStart=[path_to_your_meteor_cmd] [path_to_your_app]
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=[your_app_name]
User=[user_it_runs_under]
Group=[group_it_runs_under]
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target

save it as [your_app_name].service and after you replaced every [] with correct values, place the script in /etc/systemd/system/, then run the commands systemctl enable [appname].service and systemctl start [appname].service, the enable will start your app automatically after a reboot/crash.

Here is mine for reference:

[Service]
ExecStart=/usr/local/bin/meteor /home/meteor-run/spottr/
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=spottr
User=spottr
Group=spottr
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top