Skip to content

nsweeting/exenv_yaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exenv Yaml

Build Status Exenv Yaml Version

This is a YAML adapter for Exenv.

Installation

This package can be installed by adding exenv_yaml to your list of dependencies in mix.exs.

def deps do
  [
    {:exenv_yaml, "~> 0.3"}
  ]
end

Documentation

Further documentaion can be be found at https://hexdocs.pm/exenv_yaml.

Getting Started

Please consult the documentation for Exenv to understand its basic usage.

This package extends Exenv my adding the ability to load system env vars from a typical "secrets.yml" file that is laid out using the current environment. Below is an example:

prod:
  key: val

dev:
  key: val

test:
  key: val

You can then add this adapter to your configuration:

config :exenv, [
  adapters: [
    {Exenv.Adapters.Yaml, [file: "path/to/secrets.yml"]}
  ]
]

By default, the file will be a secrets.yml file in your projects root directory.

This adapter support secrets encryption. Please see the documentation for more details.