https://github.com/nsweeting/exenv_yaml
A yaml adapter for Exenv.
https://github.com/nsweeting/exenv_yaml
elixir env environment-variables secrets yaml yml
Last synced: about 2 months ago
JSON representation
A yaml adapter for Exenv.
- Host: GitHub
- URL: https://github.com/nsweeting/exenv_yaml
- Owner: nsweeting
- License: mit
- Created: 2019-02-11T21:21:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-10T03:16:40.000Z (almost 7 years ago)
- Last Synced: 2026-04-07T23:08:24.078Z (3 months ago)
- Topics: elixir, env, environment-variables, secrets, yaml, yml
- Language: Elixir
- Size: 25.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Exenv Yaml
[](https://travis-ci.org/nsweeting/exenv_yaml)
[](https://hex.pm/packages/exenv_yaml)
This is a YAML adapter for [Exenv](https://github.com/nsweeting/exenv).
## Installation
This package can be installed by adding `exenv_yaml` to your list of dependencies in `mix.exs`.
```elixir
def deps do
[
{:exenv_yaml, "~> 0.3"}
]
end
```
## Documentation
Further documentaion can be be found at [https://hexdocs.pm/exenv_yaml](https://hexdocs.pm/exenv_yaml).
## Getting Started
Please consult the documentation for [Exenv](https://github.com/nsweeting/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:
```yml
prod:
key: val
dev:
key: val
test:
key: val
```
You can then add this adapter to your configuration:
```elixir
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.