Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tlux committed Sep 7, 2019
1 parent ede3766 commit c54d452
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
18 changes: 16 additions & 2 deletions README.md
Expand Up @@ -41,8 +41,9 @@ releases: [
]
```

Or you can read the config path from a specified environment variable. Booting
the application fails if the environment variable is undefined.
Or you can read the config directory or path from a specified environment
variable. Booting the application fails if the specified environment variable is
undefined.

```elixir
releases: [
Expand All @@ -56,6 +57,19 @@ releases: [
]
```

Or:

```elixir
releases: [
my_app: [
config_providers: [
{TomlConfigProvider, path: {:system, "RELEASE_CONFIG_PATH"}}
],
...
]
]
```

All config provider options except `:path` are forwarded to `Toml.decode_file/2`
from the [toml-elixir](https://github.com/bitwalker/toml-elixir) library. Thus,
you can also provide custom transforms.
Expand Down
18 changes: 14 additions & 4 deletions lib/toml_config_provider.ex
Expand Up @@ -18,8 +18,9 @@ defmodule TomlConfigProvider do
]
]
Or you can read the config path from a specified environment variable. Booting
the application fails if the environment variable is undefined.
Or you can read the config directory or path from a specified environment
variable. Booting the application fails if the specified environment variable
is undefined.
releases: [
my_app: [
Expand All @@ -31,6 +32,17 @@ defmodule TomlConfigProvider do
]
]
Or:
releases: [
my_app: [
config_providers: [
{TomlConfigProvider, path: {:system, "RELEASE_CONFIG_PATH"}}
],
...
]
]
All config provider options except `:path` are forwarded to
`Toml.decode_file/2`. Thus, you can also provide custom transforms.
Expand All @@ -43,8 +55,6 @@ defmodule TomlConfigProvider do

@behaviour Config.Provider

alias TomlConfigProvider.FileNotFoundError

@impl true
def init(opts), do: opts

Expand Down

0 comments on commit c54d452

Please sign in to comment.