{"id":20434388,"url":"https://github.com/centralnicgroup-opensource/dynamic_config","last_synced_at":"2025-03-05T06:25:33.224Z","repository":{"id":96375002,"uuid":"83252330","full_name":"centralnicgroup-opensource/dynamic_config","owner":"centralnicgroup-opensource","description":"a simple elixir application config updater","archived":false,"fork":false,"pushed_at":"2017-03-02T07:02:47.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-15T19:24:46.936Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/centralnicgroup-opensource.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-27T00:34:11.000Z","updated_at":"2023-01-26T15:26:36.000Z","dependencies_parsed_at":"2023-07-08T00:50:51.902Z","dependency_job_id":null,"html_url":"https://github.com/centralnicgroup-opensource/dynamic_config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centralnicgroup-opensource%2Fdynamic_config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centralnicgroup-opensource%2Fdynamic_config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centralnicgroup-opensource%2Fdynamic_config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centralnicgroup-opensource%2Fdynamic_config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/centralnicgroup-opensource","download_url":"https://codeload.github.com/centralnicgroup-opensource/dynamic_config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241977003,"owners_count":20051757,"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":[],"created_at":"2024-11-15T08:26:21.518Z","updated_at":"2025-03-05T06:25:33.201Z","avatar_url":"https://github.com/centralnicgroup-opensource.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DynamicConfig\n\nHaving the option to manage config in a database and update application\nbehaviour by changing DB documents is handy especially if things break\nand running commands on all affected machines is slow.\n\nThis app handles application configuration and updates it every n\nseconds to make sure that we can tweak application behaviour on the fly.\nIt currently only supports CouchDB but could easily be extended to\nsupport other backends by implementing a new `DynamicConfig.BACKEND`\nmodule.\n\n## Installation\n\nThis is currently not published to Hex so pull it from git by adding\nthis to your dependencies:\n\n```elixir\ndef deps do\n  [{:dynamic_config, github: \"iwantmyname/dynamic_config\"}]\nend\n```\n\n## Usage\n\nBy adding the dependency and adding `:dynamic_config` to your\napplications the app will start a GenServer at application startup. This\nGenServer will trigger a read to the backend for updated config settings\nand update the application config if something changed. It currently\ndetermines changes by looking at the document revision of the config\ndocument. To configure behaviour of the application please add the\nfollowing configuration parameter to your application:\n\n```elixir\nconfig :dynamic_config,\n  interval: 120_000,        # update interval, defaults to 60_000\n                            # milliseconds (1 min)\n  config_db: \"conf\"         # defaults to \"config\"\n  targets: [\n    %{target: :nsearch, source: \"search\", backend: DynamicConfig.CouchDB},\n    %{target: :something, source: \"something/else\", backend: DynamicConfig.Vault}\n  ]\n```\n\nThe `update` part is the most important one as it defines the\napplication environment we want to modify, this would normally be your\nmain application. Say your main app is `:my_app` then the dynamic\nupdater would add every key in the document with the `_id: \"my_app\"` to\nyour `:my_app` application environment.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentralnicgroup-opensource%2Fdynamic_config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcentralnicgroup-opensource%2Fdynamic_config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentralnicgroup-opensource%2Fdynamic_config/lists"}