Configuration per deployment environment

35 views
Skip to first unread message

Manie Coetzee

unread,
Jun 8, 2011, 11:59:27 AM6/8/11
to play-framework
Hi,

What would be the best way to externalize the play configuration so
that the config file is loaded in the same kind of way
as for example the Spring PropertyPlaceholderConfigurer? The problem
that I have at the moment is that the same
application needs to be deployed to different environments (dev,
stage, pre-prod, prod), and the only thing that change for
each of these deployments is the configuration.

One way is probably to build my own war file, using the correct
environment 'application.conf' - what is the best way to do something
like
this using a build script like ant/gant/gradle?

Any pointers in the right direction would be much appreciated.

Julien Richard-Foy

unread,
Jun 8, 2011, 1:56:12 PM6/8/11
to play-fr...@googlegroups.com
This part of the documentation might help you:
http://www.playframework.org/documentation/1.2.1/ids

Manie Coetzee

unread,
Jun 8, 2011, 3:13:26 PM6/8/11
to play-framework
Great stuff, thanks! I just scanned that section - did not notice the
relevance at the time. I assume that I can pass in the same command
line framework id 'play run --%production' when I create a war file?
I will try it out next

Julien Richard-Foy

unread,
Jun 9, 2011, 3:59:47 AM6/9/11
to play-fr...@googlegroups.com
Yes you can
Reply all
Reply to author
Forward
0 new messages