Change the scaling logic and switch back to the socketio web server

This commit is contained in:
Patrick Jentsch
2022-04-22 16:36:12 +02:00
parent ccdd0d3faa
commit fc1389e8b1
8 changed files with 27 additions and 29 deletions

27
boot.sh
View File

@ -1,26 +1,21 @@
#!/bin/bash
source venv/bin/activate
if [[ "${#}" -eq 0 ]]; then
while true; do
echo "INFO Run deployment tasks..."
flask deploy
if [[ "${?}" == "0" ]]; then
break
fi
echo "WARNING ...Failed, retrying in 5 secs..."
sleep 5
done
if [[ "${NOPAQUE_DAEMON_ENABLED:-True}" == "True" ]]; then
if [[ "${NOPAQUE_IS_PRIMARY_INSTANCE:-True}" == "True" ]]; then
while true; do
echo "INFO Run deployment tasks..."
flask deploy
if [[ "${?}" == "0" ]]; then
break
fi
echo "WARNING ...Failed, retrying in 5 secs..."
sleep 5
done
echo "INFO Start nopaque daemon..."
flask daemon run &
fi
echo "INFO Start nopaque..."
gunicorn \
--error-logfile - \
$([ "${ENABLE_GUNICORN_RELOAD:-False}" == "True" ] && echo "--reload") \
--worker-class eventlet \
-b :5000 \
-w 1 nopaque:app
python nopaque.py
elif [[ "${1}" == "flask" ]]; then
exec ${@:1}
else