PM2
PM2
PM2 manages multiple processes, it's mostly used for node processes, but it can be used also with other interpretors
Services managed with pm2
In the TopsPizza installation we manage multiple processes with PM2
- voucher (for validating vouchers)
- order (for validating orders)
- webPrinter (socket server for dispatching orders to store printers)
- web (nuxt js website)
- pos (pos website)
- laravelEcho (laravel socket io implementation)
- laravelQueues (for processing background jobs)
Common commands:
Display all processes:
pm2 status
Monitor:
pm2 monit
Start all processes:
pm2 start ecosystem.config.js
Start a selection of processes:
pm2 start ecosystem.config.js --only=web,pos
Reload processes:
pm2 reload ecosystem.config.js
Kill all processes:
pm2 kill
Show logs for all process:
pm2 logs
Show logs for a single process:
pm2 logs laravelEcho