Skip to content

Repository files navigation

glific_superset

Superset deployment for Glific (prod), based on tech4dev/superset:6.1.0-v1.

Layout

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).

Prerequisites

  • Docker + Docker Compose v2 on the host.
  • A reachable Postgres (the URI goes in SQLALCHEMY_DATABASE_URI in superset.env).
  • A Redis is brought up by compose itself — no external dependency.

First-time setup

  1. Fill in superset.env. Required keys at minimum:

    • SUPERSET_SECRET_KEY, SUPERSET_ADMIN_USERNAME, SUPERSET_ADMIN_PASSWORD, SUPERSET_ADMIN_EMAIL
    • SQLALCHEMY_DATABASE_URI (or the DB_* 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_NAME
    • MAPBOX_API_KEY (if maps are used)
  2. Build the image:

    sh build.sh

    Produces a local image tagged superset_glific_prod.

  3. Start the stack:

    docker compose up -d
  4. Initialize the database and create the admin user (one-time):

    sh start-superset.sh

    This runs superset db upgrade, superset fab create-admin, and superset init inside the superset_glific_prod container.

  5. Superset UI: http://<host>:8088 · Celery Flower: http://<host>:5555.

Day-to-day operations

# 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-users

Updating

When 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

Containers and ports

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages