Kaliber / railo-sbt

Running and compiling using Railo
1 stars 0 forks source link

Administrator adjustments are not persisted #3

Closed jbrunemann closed 9 years ago

jbrunemann commented 9 years ago

Where can I persist my datasource settings? Or other settings such as cache, debug, etc.

EECOLOR commented 9 years ago

You can not, haha. Definitely something we need to change

jbrunemann commented 9 years ago

It's not that bad. You can configure almost everything in your Application.cfc, including datasources, caching, and things like that. Downside is that you have phase (dev, staging, production) specific information in your repository.

EECOLOR commented 9 years ago

In the plugin I added a dependency on "com.typesafe" % "config" % "1.2.1" which is the same configuration library used by Play and Akka

In the example application Application.cfc I added a call to the configuration. The conf shows two configuration, application.conf included by test.conf.

In the build.sbt you can see me adding the test.conf to the runner (which is using a forked proces):

javaOptions in run in Compile += "-Dconfig.resource=test.conf"

For production purposes we can use -Dconfig.url=... to retrieve it from an external location.

My guess is that this should be enough for configuration that changes between phases. Other (project) specific settings that need to be added to one of the XML files can be added on request. For those we will introduce sbt settings.