Our Scala components are in the process of switching from our own
WhiskConfig to the TypesafeConfig based
pureconfig. That will give us a more sane way of parsing environment values, overriding them and defining sensible defaults for them.
TypesafeConfig is able to override its values via JVM system properties. Unfortunately, docker only supports passing environment variables in a comfortable way.
To solve that mismatch, we use a script to transform environment variables into JVM system properties to spare the developer of manually overriding all the values via explicit environment -> TypesafeConfig value mapping. That script applies the following transformations to all environment variables starting with a defined prefix (“CONFIG_” in our case):
.(TypesafeConfig hierarchies are built using
camel-cased(Kebabcase is usually used for TypesafeConfig keys)
PascalCased(Defining classnames for overriding SPIs is crucial)