claudioc / jingo

Node.js based Wiki
MIT License
1.02k stars 184 forks source link

PM2 #102

Closed lewiswalsh closed 8 years ago

lewiswalsh commented 8 years ago

Has anyone managed to get Jingo running with PM2. I've installed it on a server with some other apps that I manage with PM2. Since Jingo has it's own command, and not a script to pass to node (eg. node jingo.js) I can't seem to get PM2 to manage it. Any ideas?

I can't use Forever as it conflicts with other things on the server.

claudioc commented 8 years ago

Hi,

jingo is fully compatible with PM2, but you need to know how to pass the config parameter to jingo when started via PM2. There are two options:

From the command line: pm2 start jingo -- -c config.yaml (please note the double hyphen)

Using a pm2.json configuration file (I'd probably use this option, because it's more flexible)

{
  "apps": [{
    "name": "jingo",
    "script": "jingo",
    "args": ["-c", "config.yaml"]
  }]
}

Note that it also seems that you have to pm2 delete the errored jingos you might have started already.

HTH

lewiswalsh commented 8 years ago

Works great, many thanks.