Add environment variable to change the default config file path ./config.toml#141
Add environment variable to change the default config file path ./config.toml#141josecelano merged 1 commit intotorrust:developfrom josecelano:issue-130-add-env-env-to-change-config-file-path
./config.toml#141Conversation
|
Hi @da2ce7 @WarmBeer, I've just realised that we cannot update the settings when we use the environment variable instead of the If we use the env var there is no file. The main problem is that the config env var was added as a read-only way to inject configuration. From my point of view, we should move to the database or a different file the settings we want to allow the admin to change via the admin panel. If we want the admin to change everything then we have to make some changes because, for example, you cannot change the app port or IP without restarting the socket (gracefully). For the time being, I would only allow changing these settings: And I would move them to a new table in the database (with default values). If we do not want to make those changes now, I would totally disable the ability to update the settings from the control panel. |
You can overwrite the default config file path with: ``` TORRUST_IDX_BACK_CONFIG_PATH=./storage/config/config.toml cargo run ``` The default path is `./config.toml`
|
ACK 655f631 |
You can now overwrite the default config file path with:
TORRUST_IDX_BACK_CONFIG_PATH=./storage/config/config.toml cargo runThe default path is
./config.toml