Kaynağa Gözat

feat: update up/update shell command

Acathur 5 yıl önce
ebeveyn
işleme
d05c38b85f
2 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 1 1
      shell/container-code-update.sh
  2. 1 0
      shell/container-up.sh

+ 1 - 1
shell/container-code-update.sh

@@ -12,5 +12,5 @@ current_git_branch_last_id=`cat /var/www/.proginn-frontend-commit-id`
 if [[ "$current_git_branch_latest_id" != "$current_git_branch_last_id" ]]; then
     echo "$current_git_branch_latest_id" > /var/www/.proginn-frontend-commit-id
     cd /proginn-frontend && rm -rf node_modules && npx yarn --registry=https://registry.npm.taobao.org install && npm run build_dev
-    cd /proginn-frontend && pm2 delete all && pm2 start npm --name proginn-frontend -- run start_dev
+    cd /proginn-frontend && pm2 delete proginn-frontend && pm2 start npm --name proginn-frontend -- run start_dev
 fi

+ 1 - 0
shell/container-up.sh

@@ -80,6 +80,7 @@ cd /proginn-frontend
 chown -R www-data:www-data .
 su -c "cd /proginn-frontend && rm -rf node_modules && npx yarn --registry=https://registry.npm.taobao.org install && npm run build_dev" -s /bin/bash - www-data
 su -c "cd /proginn-frontend && pm2 start npm --name proginn-frontend -- run start_dev" -s /bin/bash - www-data
+su -c "cd /workspace/kaifain/client && npx yarn --registry=https://registry.npm.taobao.org install && pm2 start npm --name kaifain-client -- run start" -s /bin/bash - www-data
 
 # 启动定时脚本
 service cron restart