tmp
Showing posts with label
pm2
.
Show all posts
Showing posts with label
pm2
.
Show all posts
Monday, October 16, 2017
pm2 command
### show config ``` pm2 conf ``` ### show module config ``` pm2 conf
```
Thursday, January 21, 2016
pm2 reload is not work when symbolic link is changed
以下の構成で `test` のsymlinkを `test1` -> `test2` と変更してreloadしたい場合 ``` - test1 - server.js - ecosystem.json - test2 - server.js - ecosystem.json - test -> test1 <-- symlink ``` 最初は以下のように設定し、deployしていたが、これだとreloadはされるけど`test2`のスクリプトでreloadされない (`test1`がreloadされただけ) `ecosystem.json`(test1, test2で同じ) ``` { "name": "test-app", "script": "server.js", "exec_mode": "cluster", "instances": 0 } ``` deploy command ``` $ ln -sfn test test2 $ cd test2 $ pm2 startOrGracefulReload ecosystem.json ``` `ecosystem.json` の `cwd` にsymlinkのfull pathを設定し、 pm2の実行をsymlinkのpathで実行するようにすればいけた `ecosystem.json`(test1, test2で同じ) ``` { "name": "test-app", "script": "server.js", "exec_mode": "cluster", "instances": 0, "cwd": "/var/node/test-app/test" // <-- symlinkのfull path } ``` deploy command ``` $ ln -sfn test test2 $ cd test // <-- symlink の方へ移動 $ pm2 startOrGracefulReload ecosystem.json ```
Older Posts
Home
Subscribe to:
Posts (Atom)