Commit Graph
1 Commits
Author SHA1 Message Date
Anton Popovichenko 8447f627ba Core/Config: Implement config override with env vars (#26811)
* Core/Config: Implement config override with env vars

Implement overriding of configuration from the .conf file with environment variables.
Environment variables keys are autogenerated based on the keys defined in .conf file.
Usage example:
$ export TC_DATA_DIR=/usr
$ TC_WORLD_SERVER_PORT=8080 ./worldserver

* Core/Config Fix typo in logs

Co-authored-by: Giacomo Pozzoni <[email protected]>

* Core/Config Fix code style in EnvVarForIniKey

Co-authored-by: Shauren <[email protected]>

* Update tests/common/Config.cpp

* Apply suggestions from code review

Co-authored-by: Peter Keresztes Schmidt <[email protected]>

* Apply suggestions from code review

Co-authored-by: Peter Keresztes Schmidt <[email protected]>

Co-authored-by: Anton Popovichenko <[email protected]>
Co-authored-by: Giacomo Pozzoni <[email protected]>
Co-authored-by: Shauren <[email protected]>
Co-authored-by: Peter Keresztes Schmidt <[email protected]>
(cherry picked from commit 1ddd9dc19cc1df1a1ab8c6123283999f9dea6760)
2022-03-13 16:37:01 +01:00