homebench/boot.sh

21 lines
392 B
Bash
Executable File

#! /bin/sh
#
# boot.sh
# Copyright (C) 2020 jpk <jpk+dev@goatpr0n.de>
#
# Distributed under terms of the MIT license.
#
source venv/bin/activate
while true; do
flask db upgrade
if [[ "$?" == "0" ]]; then
break
fi
echo Deploy command failed, retrying in 5 secs...
sleep 5
done
exec gunicorn -b :5000 --access-logfile - --error-logfile - "homebench:create_app()"