Make MQTT and Grafana dashboard settings configurable via environment variables - #2
Merged
Merged
Conversation
…arning v5 was pinned to a Node 20 runtime, which GitHub Actions now warns is deprecated; v10 targets Node 24 natively. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
astral-sh/setup-uv only publishes full semver tags, not a floating v10. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Build validation without publishing (build-test.yml) is now redundant since a main push builds and publishes directly; folded into docker-build-push.yml. Tag pushes still publish latest + semver tags, gated separately so main pushes never touch `latest`. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…configurable via env vars
Friedjof
force-pushed
the
feat/env-var-config
branch
from
September 3, 2026 20:56
aec7b6c to
f9c54fc
Compare
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.
Summary
_env_str,_env_int,_env_bool) to read configuration from environment variables with a fallback default.MQTT_BROKER_URL,MQTT_BROKER_PORT,MQTT_USERNAME,MQTT_PASSWORD,MQTT_KEEPALIVE,MQTT_TLS_ENABLED,MQTT_TOPIC) configurable via env vars.GRAFANA_DASHBOARD_UID,GRAFANA_PANEL_ID) and its background refresh interval (HEATMAP_REFRESH_INTERVAL) configurable via env vars.Why
So the image can be reused for a different space/broker/dashboard (or just to override values for local testing) purely via
docker run -e .../compose.yml'senvironment:, without touching the source.Test plan
GRAFANA_PANEL_IDandHEATMAP_REFRESH_INTERVALvia env vars — values are picked up with correct types (int).MQTT_BROKER_URL/MQTT_TLS_ENABLED— confirmed the MQTT client actually used the overridden host/TLS setting when connecting.