-
-
Notifications
You must be signed in to change notification settings - Fork 13
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 #72
Comments
This is not impossible, but it is a bit tricky. The It would also make the setup procedure have even more branching directions, and it's already complicated enough, I think. Something I do have planned, is adding an environment var to specify the location of |
Is there a specific use case you have in mind, or a certain problem you're trying to solve? |
The reason this config via Environment Variables would be of an advantage is in an infrastructure as code environment such as docker-compose. An example (which I feel ties in quite nicely with it's symbiosis) of how a structured configuration via environment variables can be achieved is Z2M itself to which, a basic config for Bifrost can be achieved with something like the following in a docker-compose file: services:
bifrost:
image: ghcr.io/chrivers/bifrost:latest
container_name: bifrost
restart: unless-stopped
network_mode: host
environment:
BIFROST_CONFIG_BIFROST_CERT_FILE: certs/cert.pem
BIFROST_CONFIG_BRIDGE_NAME: Bifrost
BIFROST_CONFIG_BRIDGE_MAC: 00:11:22:33:44:55
BIFROST_CONFIG_BRIDGE_IPADDRESS: 10.12.0.20
BIFROST_CONFIG_BRIDGE_NETMASK: 255.255.255.0
BIFROST_CONFIG_BRIDGE_GATEWAY: 10.12.0.1
BIFROST_CONFIG_BRIDGE_TIMEZONE: Europe/Copenhagen
BIFROST_CONFIG_Z2M_SERVER1_URL: ws://10.0.0.100:8080 This would allow for configuration to be applied at runtime which could help with more complicated infrastructure configurations such as docker swarm or kubernetes |
This would be super useful for having the yaml's in a separate directory and using docker volumes :-) |
Having an environment variables point to a I'll mark this issue as a feature request for that :) |
Hi,
Given that Docker is now an option for installation, it'd be great if the application could be configured via Environment variables.
The text was updated successfully, but these errors were encountered: