I have following folder structure:
current
releases
2192091029019/
1029012901920/
Latest release gets pushed to current folder, and I afterwards start it wiht pm2 start
, however If I upload new release with different folder name and do pm2 reload
from new folder it still trys to reference original release from where application was started. Is there a way to restart application respecting new code?
答案 0 :(得分:1)
此版本结构存在同样的问题,但supervisord
+ Rails
代替pm2
+ node
。
在我的情况下,我需要完全重启supervisord
每个部署来解决这个问题。
所以在你的情况下它可能会这样:
pm2 stop
kill -SIGTERM {pm2_pid}
pm2 startup
这是一种hackish但工作的解决方案。