exenv_yaml v0.1.0 Exenv.Adapters.Yaml View Source

Loads env vars from .yml files.

Below is a simple example of a .yml file:

prod:
  key1: val
  key2: val

dev:
  key1: val
  key2: val

test:
  key1: val
  key2: val

Assuming we have the above file in our project root directory, we would be able to access any of the above environment vars.

System.get_env("KEY1")

Link to this section Summary

Functions

Loads the system env vars from a .yml specified in the options

Link to this section Functions

Loads the system env vars from a .yml specified in the options.

Options

  • :file - The file path in which to read the .yml from. By default this is a secrets.yml file in your projects root directory.
  • :env - The env to use for the secrets. By default this is the value from Mix.env/0. Must be a string.