server_update.sh 509 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env bash
  2. cd /space/YellowLabTools
  3. # Stop the server and start the maintenance mode
  4. forever stopall
  5. forever start server_config/maintenance.js
  6. # Keep the settings.json file
  7. git stash
  8. git pull
  9. git stash pop
  10. # In case something was added in package.json
  11. rm -rf node_modules
  12. npm install || exit 1
  13. # Front-end compilation
  14. rm -rf front/build
  15. grunt build
  16. # Stop the maintenance mode and restart the server
  17. forever stopall
  18. NODE_ENV=production forever start -c "node --stack-size=262000" bin/server.js