mirror of
https://github.com/getumbrel/umbrel-apps.git
synced 2026-11-23 06:10:57 +03:00
18 lines
620 B
Bash
Executable File
18 lines
620 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Block until the service is healthy before creating users
|
|
"${UMBREL_ROOT}/scripts/app" compose "${APP_ID}" up --detach --wait --wait-timeout 60 web
|
|
|
|
# Create the default username and password.
|
|
for attempt in $(seq 1 3); do
|
|
if "${UMBREL_ROOT}/scripts/app" compose "${APP_ID}" run --rm web "./create-user -admin -username satwatch -password ${APP_PASSWORD} -idempotent"; then
|
|
echo "Successfully created default user"
|
|
break
|
|
else
|
|
# The database takes time to initialize after installation.
|
|
echo "Failed to create default user. Retrying..."
|
|
sleep 0.5
|
|
fi
|
|
done
|