#!/usr/bin/env bash # superset-init: migrate the metadata database, sync roles and permissions, and # register the connection to fuel-db. It is copied into the Superset image, so a # change here changes the image tag; deploy/deploy.sh runs it on a fresh install # and whenever that tag changes. Every step is idempotent. Unlike the # upstream docker-init.sh it never creates a local admin: users come from # Keycloak. set -euo pipefail superset db upgrade superset init # No password here: superset_config.py reads it from /run/secrets at connect time. superset set-database-uri \ --database_name "Fuel" \ --uri "postgresql+psycopg2://fuel_ro@fuel-db:5432/fuel"