瀏覽代碼

Gitbook Auto Published

Willin Wang 7 年之前
父節點
當前提交
858459e9ce
共有 5 個文件被更改,包括 28 次插入3 次删除
  1. 2 3
      README.md
  2. 1 0
      SUMMARY.md
  3. 二進制
      _static/operation/restarter1.png
  4. 二進制
      _static/operation/restarter2.png
  5. 25 0
      operation/restarter.md

+ 2 - 3
README.md

@@ -1,7 +1,6 @@
-# Replacer
-
-## 《可替代的团队领袖培养计划》
+# 《可替代的团队领袖培养计划》
 
+<http://leader.js.cool>
 
 ### 安装
 

+ 1 - 0
SUMMARY.md

@@ -2,3 +2,4 @@
 
 - 运维
   - [CI工作流](operation/workflow.md)
+  - [重启所有服务](operation/restarter.md)

二進制
_static/operation/restarter1.png


二進制
_static/operation/restarter2.png


+ 25 - 0
operation/restarter.md

@@ -0,0 +1,25 @@
+# 重启所有服务
+
+![Image](/_static/operation/restarter1.png)
+
+虽然CRP中工作流可以一个点流出至多个点,但只有第一个子任务会执行。
+
+所以我将自动重启任务改为了串行执行。
+
+## 配置手动启动
+
+![Image](/_static/operation/restarter2.png)
+
+如上图所示,将第一个代码检出任务的【自动触发】勾选去掉。
+
+后续的每个工作流可以是每一台单独服务器或是每几台相同环境的负载均衡机器。
+
+## 重启Shell脚本
+
+```
+pm2 kill
+rm -f /home/xxx-user/xxx-project1/logs/*.log
+rm -f /home/xxx-user/xxx-project2/logs/*.log
+pm2 start /home/xxx-user/xxx-project1/app.json
+pm2 start /home/xxx-user/xxx-project2/app.json
+```