Closed tlater-famedly closed 2 months ago
What should happen if the file doesn't exist? Should it just fail or should it try to read every config filed from the env vars?
What should happen if the file doesn't exist? Should it just fail or should it try to read every config filed from the env vars?
It should try to fill the config with env vars. The practical use case for this is kubernetes, where we want to do configuration with environment variables as much as possible.
Description
The ldap-sync tool should support multiple sources of configuration, both a configuration file and configuration via environment variables. Currently only the configuration file is supported.
This can either be implemented manually, or a crate like https://docs.rs/config or https://docs.rs/figment could be used. While we use
config
in other crates, it is semi-unmaintained, so figment might be the better choice.Requirements
server.bind_address
becomesSERVER__BIND_ADDRESS