My requirement is to pass the application.conf file for Play framework based Scala application at deploy time in a Docker setup on Kubernetes, in order to support values passed using secrets. However, the constraint I have is I use the application's fat-jar as entrypoint in the Dockerfile:
...
EXPOSE 9000
ENTRYPOINT java -jar myapp.jar
I want to build the fat-jar with reference to that application.conf which will be passed at deploy time (using secrets), with SBT command, something like:
sbt -Dconfig.file="/opt/myorg/myapp/application.conf" clean publish
But this would fail as the file would only be available at deploy time. How can I achieve this?