https://github.com/stakater/dockerfile-git2consul
dockerfile image for git2consul
https://github.com/stakater/dockerfile-git2consul
consul docker-image dockerfile git2consul
Last synced: 6 months ago
JSON representation
dockerfile image for git2consul
- Host: GitHub
- URL: https://github.com/stakater/dockerfile-git2consul
- Owner: stakater
- License: apache-2.0
- Created: 2017-12-06T12:19:31.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T02:51:24.000Z (about 2 years ago)
- Last Synced: 2024-04-15T04:16:19.135Z (almost 2 years ago)
- Topics: consul, docker-image, dockerfile, git2consul
- Language: Shell
- Size: 7.81 KB
- Stars: 0
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dockerfile-git2consul
Dockerfile image for git2consul
git2consul
`git2consul` takes one or more git repositories and then map them on to the consul server. Target is to read configurations from git repo and save them as key value pairs in consul server.
Any change in git repo is mapped on to the consul server after every 1 minute.
Usage
To run the docker container of `git2consul`, set command in environment variable `command`.
E.g:
```docker run -d -e COMMAND="git2consul --endpoint 127.0.0.1 --port 80 --config-file /home/git2consul/config.json" -v /home/git2consul/:/home/git2consul stakater/git2consul:0.12.13```
where endpoint is the location of the consul server, port is the consul server port and config.json file contains the information of git repository and some other configurations of `git2consul`.
Example `config.json`:
```
{
"version": "1.0",
"repos" : [{
"name" : "keyValue pairs",
"url" : "your git repo link",
"branches" : ["dev"],
"include_branch_name" : false,
"ignore_repo_name" : true,
"ignore_file_extension" : true,
"expand_keys": true,
"hooks": [{
"type" : "polling",
"interval" : "1"
}]
}]
}
```
You can learn more about `git2consul` configurations [here](https://github.com/breser/git2consul).
If you do not set command in environment variable `command`, container will run default command, which is as follow:
`git2consul --endpoint 127.0.0.1 --port 80 --config-file /home/git2consul/config.json`
Available Versions
`v0.12.13`
Layers
alpine:3.5 > stakater/base-alpine:3.5 > stataker/node/6.9 > stakater/git2consul