{"id":16019457,"url":"https://github.com/surik/distillery_consul","last_synced_at":"2025-03-18T03:31:20.517Z","repository":{"id":57490526,"uuid":"151408622","full_name":"surik/distillery_consul","owner":"surik","description":"Distillery config provider for Consul KV","archived":false,"fork":false,"pushed_at":"2018-12-17T17:09:35.000Z","size":15,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T06:32:08.911Z","etag":null,"topics":["consul","distillery","elixir"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/surik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-03T12:25:06.000Z","updated_at":"2023-05-14T14:42:19.000Z","dependencies_parsed_at":"2022-09-08T06:30:35.062Z","dependency_job_id":null,"html_url":"https://github.com/surik/distillery_consul","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surik%2Fdistillery_consul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surik%2Fdistillery_consul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surik%2Fdistillery_consul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surik%2Fdistillery_consul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/surik","download_url":"https://codeload.github.com/surik/distillery_consul/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243896641,"owners_count":20365408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["consul","distillery","elixir"],"created_at":"2024-10-08T17:04:27.838Z","updated_at":"2025-03-18T03:31:20.192Z","avatar_url":"https://github.com/surik.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DistilleryConsul\n\n[![Build Status](https://travis-ci.org/surik/distillery_consul.svg?branch=master)](https://travis-ci.org/surik/distillery_consul)\n\nDistillery config provider for Consul KV with minium dependencies.\n\nLinks:\n* [Custom Configuration Providers](https://hexdocs.pm/distillery/extensibility/config_providers.html)\n* [Consul Key/Value Store](https://www.consul.io/intro/getting-started/kv.html)\n\n## Installation and Using\n\nThe package can be installed by adding `distillery_consul` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:distillery_consul, \"~\u003e 0.1.0\"},\n    {:jason, \"~\u003e 1.1\"}\n  ]\nend\n```\n\nThen add provider to your release configuration in `rel/config.exs`:\n\n```elixir\nrelease :app do\n  set version: current_version(:app)\n  set applications: [\n    :runtime_tools\n  ]\n  set config_providers: [\n    {DistilleryConsul.Provider, [\n      host: \"http://localhost\", \n      port: 8500, \n      token: \"ConsulAccessToken12345\" # may be absent\n    ]}\n  ]\n```\n\nNow you can use `{:consul, \"some/key\"}` as value in your Elixir configuration file.\n\nThe following configuration:\n\n```elixir\nconfig :app, \n  rate_limit: {:consul, :integer, \"app/rate_limit\"},\n  url: {:consul, :string, \"app/url\"},\n  level: {:consul, :atom, \"app/level\"}\n```\n\nThey will be changed based on values in Consul KV during release startup:\n\n```\n$ _build/dev/rel/app/bin/app console\n...\niex(app@127.0.0.1)1\u003e Application.get_all_env(:app)\n[rate_limit: 100, url: \"https:/example.com:8081/service\", level: :info]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurik%2Fdistillery_consul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurik%2Fdistillery_consul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurik%2Fdistillery_consul/lists"}