Bug description

TLDR: SUPERSET_LOAD_EXAMPLES=no docker compose -f docker-compose-image-tag.yml up is a solution/work that worked for Superset 5.0.0 and Docker Desktop 4.44.1 (201842).

I followed the instructions here https://superset.apache.org/docs/quickstart/:

# Enter the repository you just cloned
$ cd superset

# Set the repo to the state associated with the latest official version
$ git checkout tags/5.0.0

# Fire up Superset using Docker Compose
$ docker compose -f docker-compose-image-tag.yml up

Before I ran the docker compose command, I created a docker/.env-local containing SUPERSET_LOAD_EXAMPLES=no. I believe this is what the documentation says to do here essentially https://superset.apache.org/docs/installation/docker-compose/#configuring-further, and that's what this stackoverflow answer says too https://stackoverflow.com/a/79412095/8061073.

NOTE: I ran the env command in all of the containers, and I see that SUPERSET_LOAD_EXAMPLES gets set to no. (That is, SUPERSET_LOAD_EXAMPLES is not set to yes anywhere.)

However, this did not work. The examples still get loaded. Worse, I had tried to manually delete all of the examples, but when I restarted the containers (e.g. running docker compose -f docker-compose-image-tag.yml up after having first stopped them), the examples get loaded again...

I also recall trying to comment out the SUPERSET_LOAD_EXAMPLES variable altogether from docker/.env, but that did not work either.

However, when I remove the line SUPERSET_LOAD_EXAMPLES: "${SUPERSET_LOAD_EXAMPLES:-yes}" in the docker-compose file, the value in .env-local gets picked up, as expected. Thus, the right way to avoid loading examples is not to set SUPERSET_LOAD_EXAMPLES=no in .env-local, but to set the variable from the host shell essentially:

SUPERSET_LOAD_EXAMPLES=no docker compose -f docker-compose-image-tag.yml up

To prevent people from running into this issue in the future, we should do one of the following: 1. Remove SUPERSET_LOAD_EXAMPLES: "${SUPERSET_LOAD_EXAMPLES:-yes}" from the compose file. 2. Remove SUPERSET_LOAD_EXAMPLES from the docker/.env file (to prevent people from thinking that modifiying it there will have any effect), and change the documentation at https://superset.apache.org/docs/installation/docker-compose/#configuring-further and the Stackoverflow answer at https://stackoverflow.com/a/79412095/8061073 telling people to prefix SUPERSET_LOAD_EXAMPLES=no to their docker compose command.

Screenshots/recordings

No response

Superset version

5.0.0

Python version

Not applicable

Node version

18 or greater

Browser

Chrome

Additional context

Docker version is: 4.44.1 (201842)

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

Hi @intellisession! I'm Dosu and I’m helping the superset team.

Your analysis is correct: setting SUPERSET_LOAD_EXAMPLES=no in docker/.env-local should override the default in docker/.env, as documented in the official Superset Docker Compose guide. However, if the compose file explicitly sets SUPERSET_LOAD_EXAMPLES: "${SUPERSET_LOAD_EXAMPLES:-yes}" in the environment section, this can override values from both .env and .env-local, leading to the behavior you observed. In this case, only setting the variable in the host shell (e.g., SUPERSET_LOAD_EXAMPLES=no docker compose ...) reliably overrides everything else, because host shell variables always take precedence in Docker Compose’s variable resolution order docs.

The env_file directive in the compose file is designed to merge .env and .env-local, with .env-local overriding .env for duplicate keys compose file. But if the variable is also set explicitly in the environment section, that value takes priority, which can prevent .env-local from working as intended.

Your proposed solutions are valid: removing the explicit SUPERSET_LOAD_EXAMPLES line from the compose file or updating the documentation to recommend setting the variable in the host shell would both resolve this confusion. There are no recent changes or issues addressing this, so a documentation update would help others avoid this pitfall docs.

For now, the most reliable way to prevent example data from loading is to prefix your compose command with SUPERSET_LOAD_EXAMPLES=no.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X