Skip to content

Commit

Permalink
avniproject/avni-infra#31 | Setup pm2 startup service for avni-media …
Browse files Browse the repository at this point in the history
…during install
  • Loading branch information
1t5j0y committed Jun 25, 2024
1 parent 63608e1 commit f5db7b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions deploy/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,6 @@ EOF
#Persist apps to ensure they get restarted automatically
sudo su - avni-media-user << EOF
pm2 startup systemd
sudo env PATH=$PATH:/home/avni-media-user/.nvm/versions/node/v19.8.1/bin /home/avni-media-user/.nvm/versions/node/v19.8.1/lib/node_modules/pm2/bin/pm2 startup systemd -u avni-media-user --hp /home/avni-media-user

This comment has been minimized.

Copy link
@himeshr

himeshr Jun 26, 2024

Contributor

@1t5j0y should we delete line no 81..
And add line break after following
sudo env PATH=$PATH:/home/avni-media-user/.nvm/versions/node/v19.8.1/bin

Final content in lines 81 and 82:

sudo env PATH=$PATH:/home/avni-media-user/.nvm/versions/node/v19.8.1/bin
/home/avni-media-user/.nvm/versions/node/v19.8.1/lib/node_modules/pm2/bin/pm2 startup systemd -u avni-media-user --hp /home/avni-media-user

This comment has been minimized.

Copy link
@1t5j0y

1t5j0y Jun 26, 2024

Author Contributor

yeah we could delete line 81.

The entire command needs to run with sudo. Similar to what we are doing in avni-infra for rules-server here.

This comment has been minimized.

Copy link
@himeshr

himeshr Jun 26, 2024

Contributor

okay, lets just delete line 81

pm2 save
EOF

0 comments on commit f5db7b9

Please sign in to comment.