View Source Skogsra.Provider.Json (Skogsrå v2.5.0)
This module defines a JSON config provider for Skogsra.
Important: You need to add
{:jason, "~> 1.1"}
as a dependency along withSkogsra
because the dependency is optional.
The following is an example for Ecto
configuration in a file called
/etc/my_app/config.yml
:
[
{
"app": "my_app",
"module": "MyApp.Repo",
"config": {
"database": "my_app_db",
"username": "postgres",
"password": "postgres",
"hostname": "localhost",
"port": 5432
}
}
]
Then in your release configuration you can add the following:
config_providers: [{Skogsra.Provider.Json, ["/etc/my_app/config.json"]}]
Once the system boots, it'll parse and add the JSON configuration.