Superset deployment for Glific (prod), based on tech4dev/superset:6.1.0-v1.
| File / dir | Purpose |
|---|---|
Dockerfile |
Builds the customized image on top of the t4d base, layering in assets/. |
build.sh |
Wraps docker build and tags the result as superset_glific_prod. |
docker-compose.yml |
Runs 5 services: superset, redis, celery-beat, celery-worker, celery-flower. |
superset.env |
Runtime config — DB URI, secret keys, OAuth, SMTP, admin creds, etc. Fill in before first run. |
start-superset.sh |
First-run init: db upgrade, create admin user, superset init. |
assets/ |
Files copied into /app/ inside the image — logo, templates, pythonpath/superset_config.py. |
host_data/ |
Mounted into the container at /host_data/ (used for things like gcp.json). |
- Docker + Docker Compose v2 on the host.
- A reachable Postgres (the URI goes in
SQLALCHEMY_DATABASE_URIinsuperset.env). - A Redis is brought up by compose itself — no external dependency.
-
Fill in
superset.env. Required keys at minimum:SUPERSET_SECRET_KEY,SUPERSET_ADMIN_USERNAME,SUPERSET_ADMIN_PASSWORD,SUPERSET_ADMIN_EMAILSQLALCHEMY_DATABASE_URI(or theDB_*parts that build it)APPLICATION_HOST,CORS_ORIGINS- OAuth:
GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET,GOOGLE_WHITELISTED_DOMAIN - SMTP:
SMTP_HOST,SMTP_PORT,SMTP_USER,SMTP_PASSWORD,SMTP_MAIL_FROM GUEST_TOKEN_JWT_SECRET,GUEST_ROLE_NAMEMAPBOX_API_KEY(if maps are used)
-
Build the image:
sh build.sh
Produces a local image tagged
superset_glific_prod. -
Start the stack:
docker compose up -d
-
Initialize the database and create the admin user (one-time):
sh start-superset.sh
This runs
superset db upgrade,superset fab create-admin, andsuperset initinside thesuperset_glific_prodcontainer. -
Superset UI:
http://<host>:8088· Celery Flower:http://<host>:5555.
# Tail logs
docker compose logs -f superset
docker compose logs -f celery-worker
# Restart a single service
docker compose restart superset
# Stop everything (keeps volumes)
docker compose down
# Shell into the superset container
docker exec -it superset_glific_prod bash
# Run a one-off superset CLI command
docker exec -it superset_glific_prod superset list-usersWhen a new image or config change lands:
sh build.sh # rebuild the local image
docker compose up -d # recreate containers that changed
docker exec -it superset_glific_prod superset db upgrade # only if the upgrade requires it| Service | Container name | Host port |
|---|---|---|
| superset | superset_glific_prod |
8088 |
| redis | redis_glific_prod |
(internal only) |
| celery-beat | celery_beat_glific_prod |
— |
| celery-worker | celery_worker_glific_prod |
— |
| celery-flower | celery_flower_glific_prod |
5555 |
All services share the glific_prod bridge network.