I have the following prod.conf, containing the relevant information on how to connect to my PostgresSql DB.
slick.dbs.default {
profile = "slick.jdbc.PostgresProfile$"
db.dataSourceClass = "slick.jdbc.DatabaseUrlDataSource"
db.numThreads = 8
maxConnections = 8
driver="slick.jdbc.PostgresProfile$"
db.driver="org.postgresql.Driver"
url="jdbc:postgresql://db:5432/db"
user="user"
password="password"
}
(excerpt)
My Dockerfile looks like this
#...
RUN sbt stage
RUN cd target/universal/stage/bin
ENTRYPOINT ["target/universal/stage/bin/newsapi", "-Dplay.http.secret.key=KEY -Dconfig.resource=prod.conf"]
(excerpt)
With the -Dconfig.resource=prod.conf the application should start using the prod.conf and not the application.conf, right?
But when the application gets deployed it still uses a h2 database which is not part of the prod.conf and configured in the application.conf.
I dont get any warnings that the prod.conf could not be found/loaded or that the connection to the db could not be established.
What is the right way to solve this issue and is my db-url correct?
As a bit of context the postgresql db runs as a docker image as well as the play-applications. Bot are in the same network.