2

We deploy services as docker containers using Marathon. The containers include a base config file, Marathon pulls an environment config file (which has a subset of the base keys) at deployment time so when the app starts it has;

  • environment.toml
  • config.toml

when reading the config we need to conflate the values in both files to a single set, effectively masking/shadowing the values present in both files with those in the environment file.

I didn't find this functionality in the Viper docs. Unless I have missed something it seems my options are;

  • Write a package that uses Viper to read both files and perform the conflation.
  • Extend Viper

Before I start writing code, is there already a mechanism for doing this?

4

0 回答 0