{"id":20263645,"url":"https://github.com/springerpe/cf-confd-buildpack","last_synced_at":"2026-06-08T00:31:09.085Z","repository":{"id":80987045,"uuid":"183246995","full_name":"SpringerPE/cf-confd-buildpack","owner":"SpringerPE","description":"Application configuration files using templates and data from etcd, consul or environment vars","archived":false,"fork":false,"pushed_at":"2019-04-30T10:18:17.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-03T14:25:22.943Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/SpringerPE.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":"2019-04-24T14:34:24.000Z","updated_at":"2023-03-22T03:03:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f7de721-7255-46b7-8b1d-df35d7480edf","html_url":"https://github.com/SpringerPE/cf-confd-buildpack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SpringerPE/cf-confd-buildpack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2Fcf-confd-buildpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2Fcf-confd-buildpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2Fcf-confd-buildpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2Fcf-confd-buildpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpringerPE","download_url":"https://codeload.github.com/SpringerPE/cf-confd-buildpack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2Fcf-confd-buildpack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34043822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"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":[],"created_at":"2024-11-14T11:35:49.146Z","updated_at":"2026-06-08T00:31:09.052Z","avatar_url":"https://github.com/SpringerPE.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cf-confd-buildpack\n\nCloudfoundry buildpack to manage application configuration files using templates\nand data from etcd, consul, redis, vault, dns, environment variables\n\nThe idea is run [confd](https://github.com/kelseyhightower/confd) as pre-start\ntask with some template files. The templates will be rendered using the variables\nprovided by the backend (by default from environment vars) before the application\nstarts, when application is launched it gets the proper configuration.\n\n\n## Using it\n\nhttps://github.com/kelseyhightower/confd/blob/master/docs/quick-start-guide.md\n\nFirst of all, **this buildpack has no extra requirements at all, it is an intermediate\nbuildpack which is only triggered if if finds a `confd` folder** you can create app folder,\nput a `manifest.yml` like this: \n\n```manifest.yml\n---\napplications:\n- name: grafana\n  memory: 512M\n  instances: 1\n  stack: cflinuxfs3\n  random-route: true\n  buildpacks:\n  - https://github.com/SpringerPE/cf-confd-buildpack.git\n  - https://github.com/SpringerPE/cf-grafana-buildpack.git\n  env:\n    PROMETHEUS_USER: \"hola\"\n    PROMETHEUS_PASSWORD: \"adios\" \n    PROMETHEUS_URL: \"http://hola.com\"\n    ...\n```\n\nIn the app root folder, create a `confd` directory with two sub-folders,\none for the templates definition in `templates` folder and another \n`conf.d` folder for the actions of how to render those templates.\n\nExample:\n\n```\nconfd\n├── conf.d\n│   └── prometheus.toml\n├── Readme.md\n└── templates\n    └── prometheus.yml.template\n```\n\n\n`prometheus.toml`:\n```\n[template]\nsrc = \"prometheus.yml.template\"\ndest = \"/home/vcap/app/datasources/prometheus.yml\"\nkeys = [\n    \"/prometheus/password\",\n    \"/prometheus/user\",\n    \"/prometheus/url\",\n]\n```\n\n`prometheus.yml.template`:\n```\n# config file version\napiVersion: 1\n\n# list of datasources that should be deleted from the database\ndeleteDatasources:\n\n# list of datasources to insert/update depending\n# what's available in the database\ndatasources:\n- name: Prometheus\n  type: prometheus\n  access: proxy\n  orgId: 1\n  url: \"{{getv \"/prometheus/url\"}}\"\n{{if exists \"/prometheus/user\"}}\n  basicAuth: true\n  basicAuthUser: \"{{getv \"/prometheus/user\"}}\"\n  basicAuthPassword: \"{{getv \"/prometheus/password\"}}\"\n{{else}}\n  basicAuth: false\n{{end}}\n  withCredentials: false\n  isDefault: false\n  editable: false\n```\n\nand run `cf push`\n\n\n## Settings\n\nParameters are set via environment these environment variables:\n\n```\nCONFD_MODE=\"${CONFD_MODE:-onetime}\"\nCONFD_OPTS=${CONFD_OPTS:-\"-backend env\"}\nCONFD_DIR=\"${CONFD_DIR:-$APP_ROOT/confd}\"\n```\n\n# Documentation\n\nhttps://github.com/kelseyhightower/confd/blob/master/docs/quick-start-guide.md\n\n\n# Development\n\nImplemented using bash scripts to make it easy to understand and change.\n\nhttps://docs.cloudfoundry.org/buildpacks/understand-buildpacks.html\n\nThe builpack uses the `deps` and `cache` folders according the implementation purposes,\nso, the first time the buildpack is used it will download all resources, next times \nit will use the cached resources.\n\n\n# Author\n\n(c) Jose Riguera Lopez  \u003cjose.riguera@springernature.com\u003e\nSpringernature Engineering Enablement\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringerpe%2Fcf-confd-buildpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspringerpe%2Fcf-confd-buildpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringerpe%2Fcf-confd-buildpack/lists"}