Skip to content

kjanshair/docker-consul-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

consul-template with Golang configuration

This is a simple repository for understanding dynamic file configuration with Consul's KV (Key Value) store. This repository uses a super simple Golang project, located inside the src folder, which reads JSON configuration from config.json file located at src/config/config.json. But you can use this in your project the way you want.

There are 2 Consul specific files consul-template.hcl at the root and config.tpl template file located at src/config/config.tpl. consul-template.hcl which consul-template uses to get config.tpl as input and produce config.json file as the output.

Running the solution

If you have Docker and docker-compose installed on your system, simply run docker-compose up -d at the root and start editing the Consul KV store to reflect the changes in the config.json file.

About

A simple Consul KV config store demonstration with consul dev agent, consul-template and docker-compose.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published