Specifying runtime play application configuration built with "dist"

I am building universally distributable play application using the "dist" command. This works fine however it was still using the dev application configuration once deployed. I thought that, because play created the following file,

/somewhere/myapp/conf/application.conf

it would automagically use it. This appears not to be the case. How can I tell play to pick up run time changes to the application.conf?

Upvotes: 2

Views: 243

Answers (1)

The play framework does not load the myapp/conf/application.conf unless you tell it to by using the -Dconfig.file system property. Thus, launching my app with

/somewhere/myapp/bin/myapp -Dconfig.file=/somewhere/myapp/conf/application.conf

did the trick and it picked up the correct configuration.

Upvotes: 2

Related Questions