Rename TaskRunner to Daemon (because it essentially is one) and restructure cli

This commit is contained in:
Patrick Jentsch
2021-09-22 13:53:39 +02:00
parent e0219e84c9
commit 17cbfd71b4
7 changed files with 46 additions and 27 deletions

12
boot.sh
View File

@ -1,19 +1,19 @@
#!/bin/bash
source venv/bin/activate
if [[ "${NOPAQUE_DAEMON_ENABLED:-True}" == "True" ]]; then
echo "INFO Starting nopaque daemon process..."
./nopaque-daemon.sh &
fi
if [[ "${#}" -eq 0 ]]; then
while true; do
echo "INFO Run deployment tasks..."
flask deploy
if [[ "${?}" == "0" ]]; then
break
fi
echo "Deploy command failed, retrying in 5 secs..."
echo "WARNING ...Failed, retrying in 5 secs..."
sleep 5
done
if [[ "${NOPAQUE_DAEMON_ENABLED:-True}" == "True" ]]; then
echo "INFO Start nopaque daemon..."
flask daemon run &
fi
gunicorn \
--access-logfile - \
--error-logfile - \