|
@@ -70,5 +70,18 @@ if [ -n "$SPACE_ID" ]; then
|
|
|
fi
|
|
|
|
|
|
PYTHON_CMD=$(command -v python3 || command -v python)
|
|
|
+UVICORN_WORKERS="${UVICORN_WORKERS:-1}"
|
|
|
|
|
|
-WEBUI_SECRET_KEY="$WEBUI_SECRET_KEY" exec "$PYTHON_CMD" -m uvicorn open_webui.main:app --host "$HOST" --port "$PORT" --forwarded-allow-ips '*' --workers "${UVICORN_WORKERS:-1}"
|
|
|
+# If script is called with arguments, use them; otherwise use default workers
|
|
|
+if [ "$#" -gt 0 ]; then
|
|
|
+ ARGS=("$@")
|
|
|
+else
|
|
|
+ ARGS=(--workers "$UVICORN_WORKERS")
|
|
|
+fi
|
|
|
+
|
|
|
+# Run uvicorn
|
|
|
+exec "$PYTHON_CMD" -m uvicorn open_webui.main:app \
|
|
|
+ --host "$HOST" \
|
|
|
+ --port "$PORT" \
|
|
|
+ --forwarded-allow-ips '*' \
|
|
|
+ "${ARGS[@]}"
|