From c5817fc92e3022873753cf0a64ef61204d9245b8 Mon Sep 17 00:00:00 2001 From: Vincent Emonet Date: Wed, 10 Jan 2024 17:26:49 +0100 Subject: [PATCH] wait qdrant --- docker-compose.yml | 1 + scripts/start.sh | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 72f0e4f..07be8d7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,7 @@ version: "3" services: libre-chat: + depends_on: [qdrant] build: . # image: ghcr.io/vemonet/libre-chat:main volumes: diff --git a/scripts/start.sh b/scripts/start.sh index 71a8054..9e53b8b 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -34,9 +34,12 @@ fi # Initialize the Llm (ddl files if not present, build vectors) runs before the API to avoid running on multiple workers python3 /app/scripts/init.py +# Wait for Qdrant to start +sleep 10 + echo "🦄 Starting gunicorn with $LIBRECHAT_WORKERS workers on $BIND for the module $APP_MODULE with a timeout of $TIMEOUT sec" -# exec gunicorn -w "$LIBRECHAT_WORKERS" -k "$WORKER_CLASS" -b "$BIND" --timeout "$TIMEOUT" "$APP_MODULE" -exec uvicorn --host "0.0.0.0" --port 8000 "$APP_MODULE" +exec gunicorn -w "$LIBRECHAT_WORKERS" -k "$WORKER_CLASS" -b "$BIND" --timeout "$TIMEOUT" "$APP_MODULE" +# exec uvicorn --host "0.0.0.0" --port 8000 "$APP_MODULE" # -w: number of worker processes for handling requests [1] # --threads: number of worker threads for handling requests. [1]