Files
superset2/docker
Joe Li b3f8b77295 fix(embedded-e2e): strengthen assertion signal-to-noise from review
Address /review-code findings — the previous round's hardening fixed
flake but a few assertions still gave weak signals:

- The chart-rendered selector matched a still-loading chart cell, since
  Superset's `Loading` spinner itself renders an SVG. Exclude the spinner
  via `:not(:has([data-test="loading-indicator"]))` and centralize the
  selector as `EmbeddedPage.RENDERED_CHART_SELECTOR`.
- The "dashboard renders" test only proved iframe/header chrome, not the
  dashboard. Add `waitForChartRendered()` so the test name matches what
  it asserts.
- The `hideTitle` test passed for the wrong reason if the locator
  drifted (`toBeHidden()` succeeds for absent elements). Add an explicit
  `toHaveCount(0)` so the contrast against the baseline visibility check
  in test 1 is load-bearing.
- `tokenCallCount` was a `>=1` check that any rendered dashboard would
  satisfy. Tighten to `=== 1` to actually exercise the SDK's caching
  contract.
- Drop the redundant `appUrl` shadow of `appServer.url`.
- Move `import os` to module top in the docker-light config; document
  the strict `"true"`-only env-var truthiness convention.

Pre-commit clean (type-check, prettier, oxlint, ruff, mypy). Local
re-verification blocked by an unrelated worktree env issue (semantic
layers feature has incomplete state — the docker-compose-light stack
doesn't bind-mount superset-core/, so the image's stale copy lacks the
new submodule); CI on the chromium-embedded project will validate.
Changes are strictly stronger assertions and refactors so they cannot
turn a previously-passing test into a false positive.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 16:33:06 -07:00
..

Getting Started with Superset using Docker

Docker is an easy way to get started with Superset.

Prerequisites

  1. Docker
  2. Docker Compose

Configuration

The /app/pythonpath folder is mounted from ./docker/pythonpath_dev which contains a base configuration ./docker/pythonpath_dev/superset_config.py intended for use with local development.

Local overrides

Environment Variables

To override environment variables locally, create a ./docker/.env-local file (git-ignored). This file will be loaded after .env and can override any settings.

Python Configuration

In order to override configuration settings locally, simply make a copy of ./docker/pythonpath_dev/superset_config_local.example into ./docker/pythonpath_dev/superset_config_docker.py (git-ignored) and fill in your overrides.

WebSocket Configuration

To customize the WebSocket server configuration, create ./docker/superset-websocket/config.json (git-ignored) based on ./docker/superset-websocket/config.example.json.

Then update the superset-websocket.volumes config to mount it.

Docker Compose Overrides

For advanced Docker Compose customization, create a docker-compose-override.yml file (git-ignored) to override or extend services without modifying the main compose file.

Local packages

If you want to add Python packages in order to test things like databases locally, you can simply add a local requirements.txt (./docker/requirements-local.txt) and rebuild your Docker stack.

Steps:

  1. Create ./docker/requirements-local.txt
  2. Add your new packages
  3. Rebuild docker compose
    1. docker compose down -v
    2. docker compose up

Initializing Database

The database will initialize itself upon startup via the init container (superset-init). This may take a minute.

Normal Operation

To run the container, simply run: docker compose up

After waiting several minutes for Superset initialization to finish, you can open a browser and view http://localhost:8088 to start your journey.

Running Multiple Instances

If you need to run multiple Superset instances simultaneously (e.g., different branches or clones), use the make targets which automatically find available ports:

make up

This automatically:

  • Generates a unique project name from your directory
  • Finds available ports (incrementing from defaults if in use)
  • Displays the assigned URLs before starting

Available commands (run from repo root):

Command Description
make up Start services (foreground)
make up-detached Start services (background)
make down Stop all services
make ps Show running containers
make logs Follow container logs
make nuke Stop, remove volumes & local images

From a subdirectory, use: make -C $(git rev-parse --show-toplevel) up

Important: Always use these commands instead of plain docker compose down, which won't know the correct project name.

Developing

While running, the container server will reload on modification of the Superset Python and JavaScript source code. Don't forget to reload the page to take the new frontend into account though.

Production

It is possible to run Superset in non-development mode by using docker-compose-non-dev.yml. This file excludes the volumes needed for development.

Resource Constraints

If you are attempting to build on macOS and it exits with 137 you need to increase your Docker resources. See instructions here (search for memory)