mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
Merge pull request #17064 from hadadarjt/dev
fix: Resolve admin account creation on Hugging Face Spaces.
This commit is contained in:
commit
2a27db2d3b
1 changed files with 2 additions and 2 deletions
|
|
@ -53,12 +53,12 @@ if [ -n "$SPACE_ID" ]; then
|
||||||
WEBUI_SECRET_KEY="$WEBUI_SECRET_KEY" uvicorn open_webui.main:app --host "$HOST" --port "$PORT" --forwarded-allow-ips '*' &
|
WEBUI_SECRET_KEY="$WEBUI_SECRET_KEY" uvicorn open_webui.main:app --host "$HOST" --port "$PORT" --forwarded-allow-ips '*' &
|
||||||
webui_pid=$!
|
webui_pid=$!
|
||||||
echo "Waiting for webui to start..."
|
echo "Waiting for webui to start..."
|
||||||
while ! curl -s http://localhost:8080/health > /dev/null; do
|
while ! curl -s "http://localhost:${PORT}/health" > /dev/null; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
echo "Creating admin user..."
|
echo "Creating admin user..."
|
||||||
curl \
|
curl \
|
||||||
-X POST "http://localhost:8080/api/v1/auths/signup" \
|
-X POST "http://localhost:${PORT}/api/v1/auths/signup" \
|
||||||
-H "accept: application/json" \
|
-H "accept: application/json" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{ \"email\": \"${ADMIN_USER_EMAIL}\", \"password\": \"${ADMIN_USER_PASSWORD}\", \"name\": \"Admin\" }"
|
-d "{ \"email\": \"${ADMIN_USER_EMAIL}\", \"password\": \"${ADMIN_USER_PASSWORD}\", \"name\": \"Admin\" }"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue