Installation of PM2 GUI

Presentation

Process management graphical interface

By default, we install the "PM2 Gui" graphical interface which implements a server and a web interface allowing simplified process control. The server itself is managed by PM2.

Installation and configuration

Installation order :

sudo npm install pm2-gui -g

config : /usr/lib/node_modules/pm2-gui/pm2-gui.ini

The configurations to modify in the file are:

port = 8088
daemonize = false
authorization = xxxxxxxxxxxxx (votre mot de passe)

To have pm2-gui in pm2,


Create a pm2-gui folder, then the pm2-gui / pm2-gui.sh file in which you write the following lines:

#!/bin/sh

exec pm2-gui start


To launch PM2 in standalone,

Create the file pm2-gui / pm2.config.json in which you write the following lines:

{
"apps": [
{
"name": "pm2-gui",
"script": "./pm2-gui.sh"
}
]

}

You can then launch PM2 GUI as a standard process managed by PM2

pm2-gui $> pm2 start pm2.config.json


To launch PM2 GUI as a Spinalcore system application

In the directory containing your system, open the .apps.json file and complete it with the information about PM2 GUI:

{
"apps": [
{
"name": "spinal-core-hub",
"script": "spinalhub.js",
"cwd": "./nerve-center/"
},
...
{
"name": "pm2-gui",
"script": "PATH_OF_PM2_GUI/pm2-gui.sh"
}]
}


You can then launch PM2 GUI as a system voting process managed by PM2

spinalcom-system $> pm2 start launch.config.json

Following : Use of PM2 GUI