To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/tlh0l8ONb68J.Cheers,Peter--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/kZxd4pkBnkAJ.
include "application.conf"
application.secret=xxx
Also you can override specific keys without having to provide a full
configuration file:
start -Dapplication.secret=xxx
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/1UNaBVJl9wgJ.
>
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.
--
Guillaume Bort
There's one other option here as well, which is to use environment
variables with the ${?FOO} optional-substitution syntax.
In application.conf do something like:
whatever.secret=defaultdevsecret
whatever.secret=${?PRODUCTION_SECRET}
Now in production, set PRODUCTION_SECRET=something in the environment
to override defaultdevsecret.
This is especially suited to Heroku deployments which use environment
variables but could also make sense in other setups.
Caveat: this was broken until config lib 0.2.1, which was just now
copied in to Akka master, so it won't work until the next Akka
milestone release.
Havoc
> > > To post to this group, send email to play-framework@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > play-framework+unsubscribe@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/play-framework?hl=en.
>
> > --
> > Guillaume Bort
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "play-framework" group.
> > To post to this group, send email to play-framework@googlegroups.com.
> > To unsubscribe from this group, send email to
> > play-framework+unsubscribe@googlegroups.com.
On Wed, Apr 18, 2012 at 11:55 AM, Pyppe <pyry....@gmail.com> wrote:
> Hi.
>
> I am having difficulties using environment-specific config-files.
>
> For example, I have "my-env.properties", which has:
> --- start my-env.properties --
> include "application.conf"
> some.new.property=foobar
> --- end
>
properties files don't support includes - they are just regular java
properties files - try renaming it my-env.conf
Java properties syntax parses almost anything as a valid file, in this case
scala> val p = new java.util.Properties(); p.load(new
java.io.StringReader("""include "application.conf""""))
p: java.util.Properties = {include="application.conf"}
so that's why you didn't get an error.
Havoc