feat: adjust group, user and pm2 setup
This commit is contained in:
parent
ce39938a0a
commit
5d55509b51
|
@ -20,7 +20,7 @@ sudo useradd -r -s /bin/false -g <group name> <user name>
|
|||
id <group or user name>
|
||||
```
|
||||
|
||||
* extract group and user details from OS configuration
|
||||
* extract group and user details from OS configuration for verification
|
||||
```
|
||||
cat /etc/group|grep <group name>
|
||||
cat /etc/passwd|grep <group name>
|
||||
|
|
|
@ -10,7 +10,20 @@ sudo apt update
|
|||
sudo npm i -g pm2
|
||||
```
|
||||
|
||||
* create group and user ```pm2``` following this [setup](create-grp-usr.md)
|
||||
* create group and user ```pm2```
|
||||
following this [setup](create-grp-usr.md)
|
||||
|
||||
* generate the startup script\
|
||||
**NOTE:** This instruction comes back with a reply like ```To setup the Startup Script, copy/paste the following command: sudo env PATH=$PATH:/usr/bin pm2 startup systemd -u pm2 --hp /home/begerad```
|
||||
```
|
||||
pm2 startup systemd -u pm2
|
||||
```
|
||||
|
||||
* confirm that the PM2 startup service is up and running under systemd, run the following command
|
||||
```
|
||||
systemctl status pm2-<pm2 system user>.service
|
||||
```
|
||||
|
||||
# Helpful PM2 instructions
|
||||
|
||||
* list all node application (process/microservices)
|
||||
|
|
Loading…
Reference in New Issue