I’ve a product with 5 markets(different location) and each market specific configurations is stored in different config files. Like a_market…hocon, b_market…hocon and so forth.
I want to deploy Stream collector snowplow/scala-stream-collector-kafka:2.4.0-rc1 image. and want to pass each market specific config file as a
option 1 - pass as parameter
option 2 - Embed all the config values from config to inside the docker image and then deploy it.
Hey @pramod.niralakeri the easiest way would be to mount a volume with the config you want for each container - you could create custom Docker containers for each application but its a lot of overhead just to pass in a config.
You can even use a mixture of hocon files and system properties. System properties take precedence over the hocon. This new feature of using system properties was only introduced in version 2.4.1.
So you might be able to have a shared common hocon file, and then override specific values for your different markets.
Hi @pramod.niralakeri, by system properties I meant the using the -D command line flag. This is a standard flag for setting what in java applications are called system properties.
So in my example in my previous comment, -Dcollector.port=80 means set the collector.port system property to 80.
Alternatively, there is a way of using environment variables instead of system properties: