WIP: Configuration via Environment Variables #28

Draft
Tr0n wants to merge 4 commits from Tr0n/server:config/env into nightly
Contributor

First proposal for configuration via environment variables.

  • Predefined set of config keys
  • Uses std::getenv to get the variables for the keys
  • Falls back on config file if no env variable found for individual keys
  • Doesn't crash if no config file is provided
  • Minimal changes to existing config logic

Obviously this would need to be made more modular so that we can use it in other places too, but I would love to get a first round of feedback, if this is a path we should pursue further.

First proposal for configuration via environment variables. - Predefined set of config keys - Uses `std::getenv` to get the variables for the keys - Falls back on config file if no env variable found for individual keys - Doesn't crash if no config file is provided - Minimal changes to existing config logic Obviously this would need to be made more modular so that we can use it in other places too, but I would love to get a first round of feedback, if this is a path we should pursue further.
Tr0n added 4 commits 2024-06-05 23:18:21 +03:00
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b Tr0n-config/env nightly
git pull config/env

Step 2:

Merge the changes and update on Gitea.
git checkout nightly
git merge --no-ff Tr0n-config/env
git push origin nightly
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: metin2/server#28
No description provided.