server_install.sh 946 B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env bash
  2. # APT-GET
  3. sudo apt-get update
  4. sudo apt-get install lsb-release libfontconfig1 libfreetype6 libjpeg-dev -y --force-yes > /dev/null 2>&1
  5. sudo apt-get install curl git python-software-properties build-essential make g++ -y --force-yes > /dev/null 2>&1
  6. # Installation of NodeJS
  7. curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash -
  8. sudo apt-get install -y nodejs > /dev/null 2>&1
  9. source ~/.profile
  10. # Installation of some packages globally
  11. npm install forever grunt-cli -g
  12. source ~/.profile
  13. # Installation of YellowLabTools
  14. sudo mkdir /space
  15. sudo chown $USER /space
  16. cd /space
  17. git clone https://github.com/gmetais/YellowLabTools.git --branch master
  18. cd YellowLabTools
  19. npm install || exit 1
  20. # Front-end compilation
  21. grunt build
  22. # Start the server
  23. rm server_config/settings.json
  24. cp server_config/settings-prod.json server_config/settings.json
  25. NODE_ENV=production forever start -c "node --stack-size=262000" bin/server.js