Files
vulhub/base/superset/2.0.1/entrypoint.sh
Aaron 63285f61aa
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
first commit
2025-09-06 16:08:15 +08:00

37 lines
926 B
Bash

#!/bin/bash
set -eo pipefail
load_examples_async() {
echo "Waiting for Superset to be ready..."
until curl -s --max-time 1 http://localhost:8088/health > /dev/null; do
sleep 1
echo -n "."
done
echo "Loading examples..."
superset load_examples
}
if [[ ! -e /app/superset_home/superset.db ]]; then
echo "Database not found, initializing..."
superset db upgrade
echo "Creating admin user..."
superset fab create-admin \
--username ${SUPERSET_ADMIN_USERNAME:-admin} \
--firstname Superset \
--lastname Admin \
--email ${SUPERSET_ADMIN_EMAIL:-admin@superset.com} \
--password ${SUPERSET_ADMIN_PASSWORD:-vulhub}
echo "Initializing Superset..."
superset init
fi
if [[ "${SUPERSET_LOAD_EXAMPLES}" == "yes" ]]; then
# Start loading examples in background
load_examples_async &
fi
exec "$@"