server_install.sh 947 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env bash
  2. # APT-GET
  3. sudo apt-get update
  4. sudo apt-get install lsb-release libfontconfig1 libfreetype6 -y --force-yes
  5. sudo apt-get install curl git python-software-properties build-essential make g++ -y --force-yes
  6. # Installation of NodeJS
  7. sudo add-apt-repository -y ppa:chris-lea/node.js
  8. sudo apt-get update
  9. sudo apt-get install -y nodejs
  10. source ~/.profile
  11. # Installation of some packages globally
  12. npm install bower forever grunt-cli phantomjs -g
  13. source ~/.profile
  14. # Installation of YellowLabTools
  15. sudo mkdir /space
  16. sudo chown $USER /space
  17. cd /space
  18. git clone https://github.com/gmetais/YellowLabTools.git --branch master
  19. cd YellowLabTools
  20. npm install
  21. bower install --config.interactive=false --allow-root
  22. # Front-end compilation
  23. grunt build
  24. # Start the server
  25. rm server_config/settings.json
  26. cp server_config/settings-prod.json server_config/settings.json
  27. NODE_ENV=production forever start -c "node --stack-size=65500" bin/server.js