You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "intellisession (via GitHub)" <gi...@apache.org> on 2025/08/18 17:23:28 UTC

[D] SUPERSET_LOAD_EXAMPLES=no in docker/.env-local File Not Working When Using Docker Compose [superset]

GitHub user intellisession created a discussion: SUPERSET_LOAD_EXAMPLES=no in docker/.env-local File Not Working When Using Docker Compose

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

GitHub link: https://github.com/apache/superset/discussions/34739

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] SUPERSET_LOAD_EXAMPLES=no in docker/.env-local File Not Working When Using Docker Compose [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: SUPERSET_LOAD_EXAMPLES=no in docker/.env-local File Not Working When Using Docker Compose

<!-- Greeting -->
Hi @intellisession! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.

<!-- Answer -->
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](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docs/docs/installation/docker-compose.mdx).

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](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docker-compose-image-tag.yml). 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](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docs/docs/installation/docker-compose.mdx).

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


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/236d497b-995d-47ca-9698-7ef5212beaa1?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/236d497b-995d-47ca-9698-7ef5212beaa1?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/236d497b-995d-47ca-9698-7ef5212beaa1?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/236d497b-995d-47ca-9698-7ef5212beaa1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/236d497b-995d-47ca-9698-7ef5212beaa1?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/236d497b-995d-47ca-9698-7ef5212beaa1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/236d497b-995d-47ca-9698-7ef5212beaa1?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
 nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34723)

GitHub link: https://github.com/apache/superset/discussions/34739#discussioncomment-14143975

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org