ccf 4 anni fa
parent
commit
1969c2c714
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 2
      shell/container-code-update.sh
  2. 1 0
      shell/container-up.sh

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

@@ -11,6 +11,5 @@ cd /proginn-frontend && current_git_branch_latest_id=`git rev-parse HEAD`
 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 start ecosystem.config.yml
+    cd /proginn-frontend && pm2 reload ecosystem.config.yml
 fi

+ 1 - 0
shell/container-up.sh

@@ -79,6 +79,7 @@ service nginx start
 cd /proginn-frontend
 chown -R www-data:www-data .
 su -c "cd /workspace/kaifain/client && npx yarn --registry=https://registry.npm.taobao.org install && pm2 start ecosystem.config.yml" -s /bin/bash - 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 ecosystem.config.yml" -s /bin/bash - www-data
 
 # 启动定时脚本