boot.sh 263 B

12345678910111213
  1. #!/bin/sh
  2. source venv/bin/activate
  3. while true; do
  4. flask deploy
  5. if [[ "$?" == "0" ]]; then
  6. break
  7. fi
  8. echo Deploy command failed, retrying in 5 secs...
  9. sleep 5
  10. done
  11. exec gunicorn -b :5000 --access-logfile - --error-logfile - flasky:app