Skip to content
Permalink
Browse files

Update docs

  • Loading branch information...
tlux committed Sep 7, 2019
1 parent ede3766 commit c54d452e0c41790f9c57cee6081f94398b02347a
Showing with 30 additions and 6 deletions.
  1. +16 −2 README.md
  2. +14 −4 lib/toml_config_provider.ex
@@ -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: [
@@ -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.
@@ -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: [
@@ -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.
@@ -43,8 +55,6 @@ defmodule TomlConfigProvider do

@behaviour Config.Provider

alias TomlConfigProvider.FileNotFoundError

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

0 comments on commit c54d452

Please sign in to comment.
You can’t perform that action at this time.