{"id":19866136,"url":"https://github.com/tlux/database_yaml_config_provider","last_synced_at":"2026-05-05T06:40:37.928Z","repository":{"id":62429012,"uuid":"209880296","full_name":"tlux/database_yaml_config_provider","owner":"tlux","description":"An Elixir 1.9+ config provider to load a Rails style database.yml file","archived":false,"fork":false,"pushed_at":"2019-10-24T22:21:24.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-12T00:52:18.992Z","etag":null,"topics":["config","database","ecto","elixir","hex-package","postgresql","yaml"],"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/tlux.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}},"created_at":"2019-09-20T21:00:35.000Z","updated_at":"2019-10-24T22:21:26.000Z","dependencies_parsed_at":"2022-11-01T20:02:14.036Z","dependency_job_id":null,"html_url":"https://github.com/tlux/database_yaml_config_provider","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tlux/database_yaml_config_provider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlux%2Fdatabase_yaml_config_provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlux%2Fdatabase_yaml_config_provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlux%2Fdatabase_yaml_config_provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlux%2Fdatabase_yaml_config_provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tlux","download_url":"https://codeload.github.com/tlux/database_yaml_config_provider/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlux%2Fdatabase_yaml_config_provider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274186407,"owners_count":25237581,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["config","database","ecto","elixir","hex-package","postgresql","yaml"],"created_at":"2024-11-12T15:25:04.847Z","updated_at":"2026-05-05T06:40:32.896Z","avatar_url":"https://github.com/tlux.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Database YAML Config Provider\n\n[![Build Status](https://travis-ci.org/tlux/database_yaml_config_provider.svg?branch=master)](https://travis-ci.org/tlux/database_yaml_config_provider)\n[![Coverage Status](https://coveralls.io/repos/github/tlux/database_yaml_config_provider/badge.svg?branch=master)](https://coveralls.io/github/tlux/database_yaml_config_provider?branch=master)\n[![Hex.pm](https://img.shields.io/hexpm/v/database_yaml_config_provider.svg)](https://hex.pm/packages/database_yaml_config_provider)\n\nAn Elixir 1.9+ config provider to load a Rails style database.yml file with the\nfollowing structure when booting up the application.\n\n```yaml\nproduction:\n  adapter: postgresql\n  database: testdb\n  username: testuser\n  password: myPa$sw0rd\n  host: pgsqlhost\n  port: 5432\n```\n\nThe primary intention of this library is to simplify the migration process from\na Rails app to Phoenix Framework.\n\n## Prerequisites\n\n-   Elixir \u003e= 1.9\n\n## Installation\n\n```elixir\ndef deps do\n  [\n    {:database_yaml_config_provider, \"~\u003e 0.1\", only: :prod}\n  ]\nend\n```\n\n## Usage\n\nYou need to register this `DatabaseYamlConfigProvider` as config provider in\nthe releases section of your mix.exs file.\n\n```elixir\nreleases: [\n  my_app: [\n    config_providers: [\n      {DatabaseYamlConfigProvider,\n       repo: MyApp.Repo,\n       path: \"/production/shared/config/database.yml\"}\n    ],\n    ...\n  ]\n]\n```\n\nBy default, this config provider expects an `ENV` environment variable that\ncontains the current hosting environment name to be present when booting the\napplication.\n\nAlternatively, you can set the environment directly when defining the config\nprovider.\n\n```elixir\n{DatabaseYamlConfigProvider,\n repo: MyApp.Repo,\n path: \"/production/shared/config\",\n env: \"production\"}\n```\n\nOr you can speficy another env var containing the particular hosting\nenvironment on application startup:\n\n```elixir\n{DatabaseYamlConfigProvider,\n repo: MyApp.Repo,\n path: \"/production/shared/config\",\n env: {:system, \"RAILS_ENV\"}}\n```\n\nThe same works for the location of the database file. You can specify an env\nvar containing the path to a folder that contains the database.yml file:\n\n```elixir\n{DatabaseYamlConfigProvider,\n repo: MyApp.Repo,\n path: {:system, \"RELEASE_CONFIG_PATH\"}}\n```\n\nWhen the filename deviates from database.yml you can customize it, too:\n\n```elixir\n{DatabaseYamlConfigProvider,\n repo: MyApp.Repo,\n path: {:system, \"RELEASE_CONFIG_PATH\", \"my_custom_database.yml\"}}\n```\n\n## Docs\n\nDocumentation can be found at\n[HexDocs](https://hexdocs.pm/database_yaml_config_provider).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlux%2Fdatabase_yaml_config_provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftlux%2Fdatabase_yaml_config_provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlux%2Fdatabase_yaml_config_provider/lists"}