lushuncheng 6 lat temu
rodzic
commit
980513daa6
2 zmienionych plików z 2 dodań i 2 usunięć
  1. 1 1
      shell/container-code-update.sh
  2. 1 1
      shell/container-up.sh

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

@@ -11,6 +11,6 @@ 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 && npx yarn --registry=https://registry.npm.taobao.org install && npm run build
+    cd /proginn-frontend && rm -rf node_modules && npx yarn --registry=https://registry.npm.taobao.org install && npm run build
     cd /proginn-frontend && pm2 delete all && pm2 start npm --name proginn-frontend -- run start
 fi

+ 1 - 1
shell/container-up.sh

@@ -74,6 +74,6 @@ service php7.2-fpm start
 service nginx start
 cd /proginn-frontend
 chown -R www-data:www-data .
-su -c "cd /proginn-frontend && npx yarn --registry=https://registry.npm.taobao.org install && npm run build" -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" -s /bin/bash - www-data
 su -c "cd /proginn-frontend && pm2 start npm --name proginn-frontend -- run start" -s /bin/bash - www-data
 tail -f /dev/null