{"id":16770234,"url":"https://github.com/ypereirareis/consul-template-example","last_synced_at":"2026-05-16T01:34:20.186Z","repository":{"id":79249056,"uuid":"125516438","full_name":"ypereirareis/consul-template-example","owner":"ypereirareis","description":"An example configuration to manage configuration files parameters, with consul and consul template","archived":false,"fork":false,"pushed_at":"2018-03-20T12:52:27.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-21T13:01:06.506Z","etag":null,"topics":["configuration","consul","consul-template","docker","network"],"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/ypereirareis.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,"zenodo":null}},"created_at":"2018-03-16T12:56:49.000Z","updated_at":"2018-03-20T12:52:28.000Z","dependencies_parsed_at":"2023-05-29T10:45:14.187Z","dependency_job_id":null,"html_url":"https://github.com/ypereirareis/consul-template-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ypereirareis/consul-template-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ypereirareis%2Fconsul-template-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ypereirareis%2Fconsul-template-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ypereirareis%2Fconsul-template-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ypereirareis%2Fconsul-template-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ypereirareis","download_url":"https://codeload.github.com/ypereirareis/consul-template-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ypereirareis%2Fconsul-template-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33087028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["configuration","consul","consul-template","docker","network"],"created_at":"2024-10-13T06:23:24.005Z","updated_at":"2026-05-16T01:34:20.181Z","avatar_url":"https://github.com/ypereirareis.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Consul Template Example\n\n[![Build Status](https://travis-ci.org/ypereirareis/consul-template-example.svg?branch=master)](https://travis-ci.org/ypereirareis/consul-template-example)\n\nAn example configuration to manage configuration files parameters, with consul and consul template.\n\n* We use the key/value store feature of consul to create/update/delete configurations.\n* We use consul-template to generate configuration files from templates and key/values items saved.\n\n**This project is a demo, DO NOT use it directly in production.**\n\n## Start the project\n\n```bash\ngit clone git@github.com:ypereirareis/consul-template-example.git \u0026\u0026 cd consul-template-example\nchmod +x launch.sh \u0026\u0026 ./launch.sh start\n```\n\nIf you want help:\n\n```bash\n./launch.sh help\n```\n\n## What this script is doing\n\nThe `launch.sh` script is doing many things in this order:\n\n* Try to clean up the stack if needed (already started before)\n* Create a custom network with specific subnet ip range.\n* Build a custom dind image with consul-template inside.\n* Start a container running consul.\n* Start a container running consul-template.\n* Add two keys in consul for the demo.\n\nThe consul GUI is accessible at (by default): [http://10.123.100.78:8500](http://10.123.100.78:8500)  \nGo to the key/value menu item [http://10.123.100.78:8500/ui/#/dc1/kv/](http://10.123.100.78:8500/ui/#/dc1/kv/) and update key values.\n\nThen have a look at your configuration files (by default):\n\n* ./config/dev.json\n* ./config/prod.json\n\nIn the script you can configure your own:\n\n* consul container name =\u003e `CONSUL_AGENT_NAME`\n* consul-template container name =\u003e `CONSUL_TEMPLATE_NAME`\n* custom consul-template image name =\u003e `CONSUL_TEMPLATE_IMG_NAME`\n* network name for this docker project =\u003e `CONSUL_NETWORK_NAME`\n* network ip address/range for this docker project =\u003e `CONSUL_NETWORK_ADDRESS`\n\n**Of course, feel free to change anything else at your own risks.**\n\n## Remove the stack\n\n```bash\n./launch.sh remove\n```\n\n## Tests\n\n```bash\nchmod +x tests.sh \u0026\u0026 ./tests.sh\n```\n\n# LICENSE\n\nMIT License\n\nCopyright (c) 2018 Yannick Pereira-Reis\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fypereirareis%2Fconsul-template-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fypereirareis%2Fconsul-template-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fypereirareis%2Fconsul-template-example/lists"}