I have a scala sbt application and have a default application.conf.
I built a docker image to run this application via docker.
How can I replace the default application.conf
in the docker container at a run time?
I'd recommend instead of passing application.conf
file with overrides, go with overrides based on environment variables, because of reasons like:
So, you can do next: In your application conf set overrides via environment variable:
foo=default
foo={?FOO}
And run application docker container with specific override:
docker run ...
-e foo=bar \
...
Please, see for more details:
Optional system or env variable overrides
: https://github.com/lightbend/config#optional-system-or-env-variable-overridesHope this helps!