You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Leiningen plugin to load variables from .env into the environment of your
project, in a manner compatible with Foreman, the Ruby dotenv gem, and
many other tools and libraries. This is a development convenience to enable a
seamless transition to a 12 factor deployment,
which mandates configuration in the environment.
This plugin works by overriding the environment Leiningen spawns your project
with, which provides two key advantages over a plain library approach:
Java doesn't allow changing the environment at runtime, which means a
library would instead have settle for setting system properties or some
other crude approximation, defeating much of the purpose.
A library would have to be loaded and activated manually, needlessly
concerning your application with development concerns, not to mention load
order issues.
Setup
To install at the user level, put [lein-dotenv "RELEASE"] into the
:plugins vector of your :user profile in ~/.lein/profiles.clj.
{:user {:plugins [[lein-dotenv "RELEASE"]]}}
The plugin will also work on a per project level if added to project.clj.
This may be preferable if you want to avoid imposing user profile
requirements on all contributors.