Closed raboof closed 1 year ago
note we use pm2 as the process manager, not sure if it underneath uses npm start (not looked)
note we use pm2 as the process manager, not sure if it underneath uses npm start (not looked)
ah I didn't realize - does that use a configuration file (https://pm2.keymetrics.io/docs/usage/process-management/ - where?) or did you start the processes from the cli?
Update: looks like pm2 is started by systemd (/etc/systemd/system/pm2-root.service
) and keeps its state in /root/.pm2/dump.pm2
. After changes you can pm2 restart vulnogram-live
.
not sure if it underneath uses npm start (not looked)
it doesn't - currently it runs node app.js
, but I just checked and it can run/restart/etc scripts/start.sh
just as well.
Now that I understand our deployment better, this might not be sufficient: this assumes vulnogram is started from its git directory, which is true for the staging deployment but not for prod.
If you can find those deployment docs I'll propose an approach that works with both ;)
this assumes vulnogram is started from its git directory, which is true for the staging deployment but not for prod.
This is now true for prod again and reflected in the deploy docs. would need a change the the pm2 config to use start.sh, let's merge and try that on the staging environment.
vulnogram-live seemed to have reverted back to node app.js
.
I think we should pm2 stop -n vulnogram-live; pm2 start -n vulnogram-live --interpreter bash scripts/start.sh
, but I'll do that when I expect to be around to fix any problems that might cause ;)
supersedes #53