Setting and resolving environment configurations
We've already alluded to the fact that you can set configuration for environ
to consume from either environment variables or from Java system properties. This covers about 100% of real-world usage. However, during development, we can also set environment configuration using the lein-environ
plugin (which is also packaged as part of a Luminus-generated application).
When running the development server using lein ring server
, the lein-environ
plugin will fetch environment configuration from the Leiningen project map, as well as an optional profiles.clj
file, and merge the two together into the .lein-env
file. This .lein-env
file is the first go-to place for environment settings, but only when running the development server.
Note
It is recommended that the profiles.clj
and .lein-env
files not be committed into your version control, as every developer's environment is likely to be somewhat different. Plus, despite the fact that .lein-env...