add argument to start image server

This commit is contained in:
geoffrey45
2022-05-18 18:03:38 +03:00
parent edaa4cf232
commit 8405efede0
+17 -5
View File
@@ -5,8 +5,20 @@
#python manage.py
gpath=$(poetry run which gunicorn)
cd app
"$gpath" -b 0.0.0.0:9877 -w 4 --threads=2 "imgserver:app" &
echo "Booted image server"
cd ../
"$gpath" -b 0.0.0.0:9876 -w 1 --threads=4 "manage:create_app()" #--log-level=debug
while getopts ':s' opt; do
case $opt in
s)
echo "🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴"
cd "./app"
"$gpath" -b 0.0.0.0:9877 -w 4 --threads=2 "imgserver:app" &
cd ../
;;
\?)
echo "Invalid option: -$OPTARG" >&2
;;
esac
done
"$gpath" -b 0.0.0.0:9876 -w 1 --threads=4 "manage:create_app()"