maxisam / mgob

MongoDB dockerized backup agent. Runs schedule backups with retention, S3 & SFTP upload, notifications, instrumentation with Prometheus and more.
https://maxisam.github.io/mgob/
MIT License
123 stars 16 forks source link

Update environment variable naming convention #98

Closed maxisam closed 7 months ago

maxisam commented 7 months ago

Breaking Change

In this PR, there is a breaking change because the original solution doesn't work in real environment.

In bash, it is not possible to use "-" as environment name, so the new rules are

ex: plan-name-with-dash

the env will be PLAN_NAME_WITH_DASH__SECTION_PROPERTY

Special Note

The secret needs to be in the config with a placeholder

eg:

target:
  password: "load from env"

Viper has a issue to handle this https://github.com/spf13/viper/issues/761

It can handle it in version 1.8.1 but it also introduce another issue.

so we stick with version 1.6.0 and see what to do next.