Skip to content
Snippets Groups Projects

allow overriding all string config values via env - fixes #465

Merged dakkar requested to merge feature/465-env-config-override into develop

What does this PR do?

allows overriding any string-valued config option with a sensible-named environment variable

e.g. MK_CONFIG_MEILISEARCH_APIKEY overrides config.meilisearch.apikey

the option's containing object must be present in the config file, so in the example above, config.meilisearch must be set to something in the file, it can't be completely commented out.

you can also override a single dbSlave value, e.g. MK_CONFIG_DBSLAVES_1_PASS sets the password for the 2nd database replica (the first one would be MK_CONFIG_DBSLAVES_0_PASS); again, config.dbSlaves must be set to an array of the right size already in the file

values can be read from files, too: setting MK_DB_PASS_FILE to /some/file would set the main database password to the contents of /some/file (trimmed of whitespaces)

Contribution Guidelines By submitting this merge request, you agree to follow our Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines
  • I have made sure to test this pull request

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading