From c96bf805ca85871f6b41b7de72de029cb147a917 Mon Sep 17 00:00:00 2001 From: Mohamed Abdel Wedoud Date: Wed, 9 Oct 2024 20:56:59 +0200 Subject: [PATCH] fix(scripts): correct `bash` conditional statement --- Dockerfile | 1 - scripts/start.sh | 30 +++++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 975ef9b776..d91ebb185b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,5 +21,4 @@ RUN ./scripts/install-debug.sh RUN pip3 install --upgrade pip \ && pip3 install -r /conf/requirements.txt - ENTRYPOINT ["./scripts/start.sh"] diff --git a/scripts/start.sh b/scripts/start.sh index 398a855ced..a963ddc7a3 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -12,30 +12,30 @@ min() { workers=$(min 30 ${ANTARES_NB_WORKERS:-$((2*$(nproc) + 1))}) # default (2*nproc + 1) and max is 30 # Check for --no-gunicorn or --multiple-ports argument -use_gunicorn=true +use_uvicorn=false for arg in "$@" do if [[ $arg == "--no-gunicorn" || $arg == "--multiple-ports" ]]; then - use_gunicorn=false + use_uvicorn=true break fi done if [ -z "$1" ] ; then sh $CUR_DIR/pre-start.sh - if [ "$use_gunicorn" = true ]; then - gunicorn --config $BASE_DIR/conf/gunicorn.py --worker-class=uvicorn.workers.UvicornWorker antarest.wsgi:app - else - pids=() # Initialize empty array to store background process IDs - for ((i=0; i