2019-07-04 01:33:14 -04:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership.
|
|
|
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
# (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
echo "[WARNING] this entrypoint creates an admin/admin user"
|
|
|
|
echo "[WARNING] it should only be used for lightweight testing/validation"
|
2023-06-28 10:40:10 -04:00
|
|
|
|
|
|
|
if [ -z "${SUPERSET_TESTENV}" ]; then
|
|
|
|
echo "SUPERSET IS RUNNING IN TEST MODE"
|
|
|
|
fi
|
2019-07-04 01:33:14 -04:00
|
|
|
|
|
|
|
# Create an admin user (you will be prompted to set username, first and last name before setting a password)
|
2019-12-07 19:09:14 -05:00
|
|
|
superset fab create-admin \
|
2019-07-04 01:33:14 -04:00
|
|
|
--username admin \
|
|
|
|
--firstname admin \
|
|
|
|
--lastname admin \
|
|
|
|
--email admin@admin.com \
|
|
|
|
--password admin
|
|
|
|
|
|
|
|
# Initialize the database
|
|
|
|
superset db upgrade
|
|
|
|
|
|
|
|
# Create default roles and permissions
|
|
|
|
superset init
|
|
|
|
|
2023-06-08 19:30:39 -04:00
|
|
|
# Loading examples
|
2023-06-16 15:55:35 -04:00
|
|
|
superset load-examples --force
|
2023-06-08 19:30:39 -04:00
|
|
|
|
2023-06-29 15:04:32 -04:00
|
|
|
SUPERSET_ENV=development FLASK_APP="superset.app:create_app()" \
|
2019-07-04 01:33:14 -04:00
|
|
|
flask run -p 8088 --with-threads --reload --debugger --host=0.0.0.0
|