server_install.sh 1.3 KB

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env bash
  2. # APT-GET
  3. sudo apt-get update
  4. sudo apt-get install lsb-release libfontconfig1 libfreetype6 libjpeg-dev libnss3 libatk1.0-0 libatk-bridge2.0-0 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release libgbm1 xdg-utils wget -y --force-yes > /dev/null 2>&1
  5. sudo apt-get install curl git software-properties-common build-essential make g++ -y --force-yes > /dev/null 2>&1
  6. # Installation of NodeJS
  7. curl -sL https://deb.nodesource.com/setup_14.x | 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 chown -R $USER /space
  15. cd /space/YellowLabTools
  16. npm install || exit 1
  17. # Front-end compilation
  18. grunt build
  19. # Start the server
  20. rm server_config/settings.json
  21. cp server_config/settings-prod.json server_config/settings.json
  22. NODE_ENV=production forever start -c "node --stack-size=262000" bin/server.js