Repository navigation
Conversation
Container managers without Docker Compose file secrets (such as Unraid's Docker UI) pass credentials as environment variables, and bind-mounting a missing file path in Docker creates a directory in its place. In Unraid, setting Display: Password on the variable masks the token in the UI. Let SCREEN_DEV=1 read HA_TOKEN when set, falling back to HA_TOKEN_FILE as before. firmware.py's BUILD_ENV_NEVER already strips any *TOKEN* variable from child build environments. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Container managers without Docker Compose
secrets:(such as Unraid's Docker GUI) pass credentials as environment variables rather than file mounts. Mounting a single file is awkward in these UIs, and if the file does not exist yet on disk, Docker creates a directory in its place (IsADirectoryError). In Unraid, a container variable can be set toDisplay: Passwordso the token stays masked in the UI.This change lets
server.pyreadHA_TOKENwhenSCREEN_DEV=1, falling back toHA_TOKEN_FILEas before.firmware.py(BUILD_ENV_NEVER) already strips any*TOKEN*variable from child build environments.Related request
N/A (small standalone Docker improvement for Unraid /
docker runsetups).Validation
Ran
uv run --with aiohttp --with pyyaml --with jinja2 python3 -m unittest tests/test_shutdown.py tests/test_build_env.py tests/test_release_lint.py— passed (19 tests, includingtest_ha_token_env_starts_without_token_fileintests/test_shutdown.py).This pull request targets
dev.I linked the related bug or website wish, when applicable.
I described relevant tests and limitations.