deploy.bash 443 B

12345678910111213141516171819202122
  1. #!/usr/bin/bash
  2. # MUST USE SUDO
  3. TIGRO_DIR=/home/kora/Codes/Progetto_2023-OVI
  4. FE_DIR=${TIGRO_DIR}/site2
  5. BE_DIR=${TIGRO_DIR}/flask_be
  6. if test -f ${BE_DIR}/pid.nohup ; then
  7. kill $(cat ${BE_DIR}/pid.nohup)
  8. fi
  9. cp -r ${FE_DIR}/* /var/www/html/
  10. cp ${FE_DIR}/js/config_alt.js /var/www/html/js/config.js
  11. cd ${BE_DIR}
  12. source venv/bin/activate
  13. nohup waitress-serve --host 127.0.0.42 --port 5000 app:app >&nohup.out & echo $! > pid.nohup
  14. exit