Skip to content

Commit

Permalink
Revert "Remove node pm2 global install; install pm2 locally from now on"
Browse files Browse the repository at this point in the history
This reverts commit 1e314da.
  • Loading branch information
davidjb committed Aug 30, 2021
1 parent 1e314da commit 40147dd
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions nodejs/pm2.sls
@@ -0,0 +1,22 @@
include:
- jcu.nodejs

pm2:
npm.installed:
- require:
- pkg: nodejs

# Command should be re-run if nodejs or pm2 are modified
pm2 startup:
cmd.run:
- prepend_path: /usr/local/bin
- onchanges:
- npm: pm2
- pkg: nodejs

# Use onchanges_in in remote states to have pm2 save after their introduction
pm2 save:
cmd.run:
- prepend_path: /usr/local/bin
- require:
- npm: pm2

0 comments on commit 40147dd

Please sign in to comment.