diff --git a/docker/docker-init.sh b/docker/docker-init.sh index 3a42b8ca9..a2e86b983 100755 --- a/docker/docker-init.sh +++ b/docker/docker-init.sh @@ -33,29 +33,29 @@ Init Step ${1}/${STEP_CNT} [${2}] -- ${3} EOF } +# Initialize the database +echo_step "1" "Starting" "Applying DB migrations" +superset db upgrade +echo_step "1" "Complete" "Applying DB migrations" + # Create an admin user -echo_step "1" "Starting" "Setting up admin user ( admin / admin )" +echo_step "2" "Starting" "Setting up admin user ( admin / admin )" superset fab create-admin \ --username admin \ --firstname Superset \ --lastname Admin \ --email admin@superset.com \ --password admin -echo_step "1" "Complete" "Setting up admin user" +echo_step "2" "Complete" "Setting up admin user" -# Initialize the database -echo_step "2" "Starting" "Applying DB migrations" -superset db upgrade -echo_step "2" "Complete" "Applying DB migrations" +# Create default roles and permissions +echo_step "3" "Starting" "Setting up roles and perms" +superset init +echo_step "3" "Complete" "Setting up roles and perms" if [ "$SUPERSET_LOAD_EXAMPLES" = "yes" ]; then # Load some data to play with - echo_step "3" "Starting" "Loading examples" + echo_step "4" "Starting" "Loading examples" superset load_examples - echo_step "3" "Complete" "Loading examples" + echo_step "4" "Complete" "Loading examples" fi - -# Create default roles and permissions -echo_step "4" "Starting" "Setting up roles and perms" -superset init -echo_step "4" "Complete" "Setting up roles and perms"