pm2 icon indicating copy to clipboard operation
pm2 copied to clipboard

PM2 as a classic daemon

Open mspinassi opened this issue 12 years ago • 3 comments

I couldn't find any mailing list or IRC to post it, so if there is a better place to set this question, please let me know.

I'm trying to setup a few servers with PM2, and it would be great if I could make it more like a classic "daemon" mode.

  • By default, PM2 will have logs in ~/.pm2/logs. It'd be great to change it to /var/log/pm2.
  • You can set up a PID file for an app, but can't do it for PM2 itself. It's stored inside ~/pids. Having the option to set it to /var/run/pm2 would be awesome.
  • PM2 needs to start itself, start a project (server.js) and then dump/save it, in order to have it started on every reboot. This is kind of a PITA to automate (puppet/cheff/etc)
  • Unless you include or exec custom_options.sh in the init script (which it doesn't by default), these options won't be used. A config file for the daemon itself would be much appreciated!

I'm not a big developer, but if there is something a sysadmin with some dev skills can help with, just let me know.

Thanks!

Martin

mspinassi avatar Oct 27 '14 19:10 mspinassi

https://github.com/Unitech/PM2/issues/604

soyuka avatar Oct 27 '14 20:10 soyuka

Thanks for the reference @soyuka.

Should I add the rest of this ticket (startup issues and save/dump) to #604 too?

mspinassi avatar Oct 28 '14 02:10 mspinassi

Closing as related to #604

Unitech avatar Nov 13 '14 00:11 Unitech