Reputation:
I'm using activator to create my project and I use the command universal:packageBin
to generate a .zip
file.
I was wondering if it's possible to set up the application to read the configuration file from conf
folder instead of the configuration from classpath ( the .conf
file inside the jar).
Is it possible? If it's, how can i do it?
Upvotes: 2
Views: 98
Reputation: 308
See https://www.playframework.com/documentation/2.3.x/ProductionConfiguration for the mechanism of telling a Play application where to pickup its config from.
To tie that in with the universal:packageBin, just pass -Dconfig.file
to the script inside the bin directory. e.g. if your application is called foo:
unzip foo-1.0-SNAPSHOT.zip
foo-1.0-SNAPSHOT/bin/foo -Dconfig-file=/path/to/app.conf
Upvotes: 3