emerick42/kairoi

Allow the configuration file to be loaded from a specific directory

Closed this issue · 0 comments

Currently, the configuration file is loaded from the directory where Kairoi is started. While this can be convenient for testing purposes, it is also non-standard (making it harder for users to find the configuration source), and it can't be customized. In the Docker prebuilt image for example, it prevents the container from providing a custom configuration while still allowing data to be mounted as a volume.

We should allow for customization on this path.

An idea would be to use a standard Linux configuration path as default (/etc/kairoi for example). In addition, an environment variable or a command line argument could be added to change this directory, since it can't be changed in the configuration file itself.

We could also use a hierarchy of configuration files, like with XDG_DATA_DIRS, but I'm not sure this would particularly help, especially considering the added complexity, and the fact that complete customization should still be implemented.