Hello,

I am using amazon beanstalk, which allows me to define app parameters using 
system environment variables.

If there was only a few well defined variables I would want to override, 
the following would be fine:

http {
 port = 8080
 port = ${?HTTP_PORT}
}


But there are a lot of parameters to override, and moreover I don't want to 
have to explicitely define them beforehand.

What I'd like would be to use system environment variables just like java 
properties, meaning to have:
set spray.can.server.registration-timeout=5s
java -jar application.jar
work exactly like:
java -Dspray.can.server.registration-timeout=5s -jar application.jar

I tried the following:

val default = ConfigFactory.parseString(
  """a {
    |    b = "foo"
    }
  """.stripMargin)

val conf = ConfigFactory.systemEnvironment().withFallback(default)

println(conf.getString("a.b"))


which kept printing "foo" even if I defined the environment variable a.b to 
"bar". I think it doesn't work because withFallback won't override values 
that are already defined.

Do you guys have any idea on how to solve this?

Thanks,

Pierre

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to