mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac/enh: start.sh additional args support
This commit is contained in:
parent
e9bced867d
commit
6ff392edc0
1 changed files with 14 additions and 1 deletions
|
|
@ -70,5 +70,18 @@ if [ -n "$SPACE_ID" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PYTHON_CMD=$(command -v python3 || command -v python)
|
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[@]}"
|
||||||
Loading…
Reference in a new issue