first commit
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
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
This commit is contained in:
36
base/superset/2.0.1/entrypoint.sh
Normal file
36
base/superset/2.0.1/entrypoint.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/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 "$@"
|
Reference in New Issue
Block a user