diff --git a/server/start.sh b/server/start.sh index b86f0ca5..f1ce5d07 100755 --- a/server/start.sh +++ b/server/start.sh @@ -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()" + +