-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration via environment variables #1094
Comments
room-assistant utilizes node-config under the hood for its configuration interface in the current version, which does not expose these flat environment variable configurations anymore as you suggested. I think your use case is a valid one though - and while I don't think that exposing all options via env variables is possible anymore due to the complex structure, some basic options can be made available. I'll take a look at configuring this for a few basic options, such as the room name. |
Perfect, looks like quite an easy addition based on the fact node config supports it already. |
I whipped up a quick PR that implements these environment variables. Seems to work fine on my dev machine, but I want to make sure it works on a real world installation before merging & releasing. |
That was quick! |
Hmm, so is it supposed to work when loading the config from the file but the hostname from the variable?
docker-compose.yml contains:
|
Includes global and some MQTT options for now. Closes #1094
I've now tested this successfully on a real world npm installation, as well as my dev machine. In all cases the custom env variable took precedence, even when configuring an instance name both via |
My Docker test was also successful - maybe something is off in your custom image build? I can put out a new release with these changes soon, so you can test it again with the official build. |
@mKeRix Yeah, please do. I keep getting the same result locally. |
@mKeRix any update on the new release builds? Thanks |
I'll put out new releases later today. |
# [2.20.0](v2.19.1...v2.20.0) (2022-03-20) ### Bug Fixes * **bluetooth-classic:** increase change detection speed ([6325937](6325937)), closes [#775](#775) * **docker:** include heatmap dependencies in image ([7cf5de1](7cf5de1)), closes [#826](#826) ### Features * **bluetooth:** add configuration options for noise filter ([85981ee](85981ee)), closes [#775](#775) * expose some config options as env variables ([#1099](#1099)) ([3ae8e9a](3ae8e9a)), closes [#1094](#1094)
🎉 This issue has been resolved in version 2.20.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [3.0.0-beta.5](v3.0.0-beta.4...v3.0.0-beta.5) (2022-03-20) ### Bug Fixes * **bluetooth-classic:** increase change detection speed ([6325937](6325937)), closes [#775](#775) * **docker:** include heatmap dependencies in image ([7cf5de1](7cf5de1)), closes [#826](#826) ### Features * **bluetooth:** add configuration options for noise filter ([85981ee](85981ee)), closes [#775](#775) * expose some config options as env variables ([#1099](#1099)) ([3ae8e9a](3ae8e9a)), closes [#1094](#1094)
🎉 This issue has been resolved in version 3.0.0-beta.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@mKeRix Thanks! The feature works fine and I've been able to feed in the MQTT creds from a secret plus the instance name from the K8s node label :) |
I am trying to deploy room assistant as a daemonset on my RPIs via Kubernetes.
I understand that it was possible to configure previous version on RA via env variables - perfect for K8s.
However, it looks like the feature is now removed and the only option is to supply a YAML/JSON file via an environment variable or in the file system.
This means, supplying separate file for each instance because there is no easy way to override the room name and the default is the hostname, which isn't appropriate for my use case.
Is is possible to at least provide an environment variable based configuration of the room name?
The yaml is uniform for all nodes, except the room name and I could have the environment variable populated from the label of the kubernetes node which bears the desired room name.
Thanks
The text was updated successfully, but these errors were encountered: