Lift properties improved

Lift web framework uses a sophisticated file-based strategy for application properties, based on modes/hosts and file naming conventions. While very handy, this could be unpractical on a CI environment where typically one doesn’t want to mess with the filesystem (think CloudBees), and doesn’t want to store sensitive properties (such as user credentials) into SCM.

The problem is well known, and a few strategies exists.

Cloudbees, for instance has a file system workaround and supports various types of parameters.

For me, using system environment properties (one could use environment properties as well) is simple and straightforward, and keeps a reasonably high level of security. Sure, if you have a lot of them (maybe API keys) configuring the application container can be tedious, but IMO is worth the effort.

The following is a simple Property object which chains a system variable into a Box and defaults to standard lift Props. The logic here is that, if you set a system property, that should take precedence. Another discussion of the problem here.