-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart_superset.sh
32 lines (25 loc) · 1.04 KB
/
start_superset.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
export SUPERSET_HOME=$DOMINO_WORKING_DIR
#export SUP_META_DB_URI=sqlite:///$DOMINO_WORKING_DIR/superset.db
#export ADDITIONAL_LAUNCH_OPTIONS="--debugger"
export ADDITIONAL_LAUNCH_OPTIONS=""
#export PYTHONPATH=$DOMINO_WORKING_DIR:$PYTHONPATH
export FLASK_APP=superset
# set up Superset if we haven't already
if [ ! -f $SUPERSET_HOME/.setup-complete ]; then
export FLASK_APP=superset
echo "Running first time setup for Superset"
superset fab create-admin --username admin --password superset --firstname Admin --lastname Superset --email [email protected]
echo "Initializing database"
superset db upgrade
# echo "Loading examples"
# superset load_examples
echo "Creating default roles and permissions"
superset init
touch $SUPERSET_HOME/.setup-complete
else
# always upgrade the database, running any pending migrations
superset db upgrade
superset init
fi
echo "Starting up Superset"
(superset run --host "0.0.0.0" --port 8088 --with-threads --reload $ADDITIONAL_LAUNCH_OPTIONS 3>&1 1>&2 2>&3 | grep -v INFO\:) 3>&1 1>&2 2>&3