From 41431773733f5a9bd6b8a6ae9213a400fba1876e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A1ndor=20Holozsny=C3=A1k?= Date: Tue, 1 Jan 2019 21:56:52 +0100 Subject: [PATCH 1/2] Update README.md --- README.md | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 5ef226d..26528ce 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,12 @@ If you liked the project [docker-git2consul](https://github.com/Cimpress-MCP/doc * CFG - to replace the git2consul config.json * GIT_REPO - to modify basic config with your git repo(basic config is listed below) * NAMESPACE - specifys the namespace your objects will come up in -* ID - base64 encoded string of your id_rsa key that is not password protected. (only used if using ssh for repo) -* IDPUB - base64 encoded string of your id_rsa.pub +* ID - your id_rsa key that is not password protected. (only used if using ssh for repo) +* IDPUB - string of your id_rsa.pub * CONSUL_ENDPOINT - configures what consul instance to hit * CONSUL_PORT - configures what consul instance's port to hit +* IDENC - base64 encoded string of your id_rsa key that is not password protected. (only used if using ssh for repo) +* IDPUBENC - base64 encoded string of your id_rsa.pub ### Docker Examples: @@ -18,21 +20,30 @@ docker run \ --env NAMESPACE=config \ --env CONSUL_ENDPOINT=192.168.0.111 \ --env CONSUL_PORT=8500 \ - sroskelley/git2consul + gavinjonespf/docker-git2consul ``` This will download the repo https://github.com/myuser/myrepo.git and feed it into the consul server located at 192.168.0.111:8500 ``` -ID=$(cat ~/.ssh/id_rsa|base64) -IDPUB=$(cat ~/.ssh/id_rsa.pub|base64) +ID=$(cat ~/.ssh/id_rsa) +IDPUB=$(cat ~/.ssh/id_rsa.pub) +``` +OR +``` +IDENC=$(cat ~/.ssh/id_rsa|base64) +IDPUBENC=$(cat ~/.ssh/id_rsa.pub|base64) +``` +THEN + +``` CFG='{"version":"1.0","repos":[{"name":"config","url":"git@github.com:myrepo/configs.git","source_root":"dev","mountpoint":"","branches":["master"],"include_branch_name":false,"hooks":[{"type":"polling","interval":"1"}]}]}' docker run \ --env CONSUL_ENDPOINT=192.168.0.111 \ - --env CONSUL_PORT=8500 - --env ID="$ID" \ - --env IDPUB="$IDPUB"\ + --env CONSUL_PORT=8500 \ + OR --env ID="$ID" --env IDPUB="$IDPUB"\ + OR --env IDENC="$IDENC" --env IDPUBENC="$IDPUBENC"\ --env CFG="$CFG" \ - sroskelley/git2consul + gavinjonespf/docker-git2consul ``` This shows how to manually specify your own config and use ssh keys to connect to the git repo. From f98278792eed92f7d235baac74dfcb0785a4e194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A1ndor=20Holozsny=C3=A1k?= Date: Tue, 1 Jan 2019 21:58:00 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 26528ce..4b3cb2c 100644 --- a/README.md +++ b/README.md @@ -27,24 +27,29 @@ This will download the repo https://github.com/myuser/myrepo.git and feed it int ``` ID=$(cat ~/.ssh/id_rsa) IDPUB=$(cat ~/.ssh/id_rsa.pub) +CFG='{"version":"1.0","repos":[{"name":"config","url":"git@github.com:myrepo/configs.git","source_root":"dev","mountpoint":"","branches":["master"],"include_branch_name":false,"hooks":[{"type":"polling","interval":"1"}]}]}' +docker run \ + --env CONSUL_ENDPOINT=192.168.0.111 \ + --env CONSUL_PORT=8500 \ + --env ID="$ID" \ + --env IDPUB="$IDPUB" \ + --env CFG="$CFG" \ + gavinjonespf/docker-git2consul ``` OR ``` IDENC=$(cat ~/.ssh/id_rsa|base64) IDPUBENC=$(cat ~/.ssh/id_rsa.pub|base64) -``` -THEN - -``` CFG='{"version":"1.0","repos":[{"name":"config","url":"git@github.com:myrepo/configs.git","source_root":"dev","mountpoint":"","branches":["master"],"include_branch_name":false,"hooks":[{"type":"polling","interval":"1"}]}]}' docker run \ --env CONSUL_ENDPOINT=192.168.0.111 \ --env CONSUL_PORT=8500 \ - OR --env ID="$ID" --env IDPUB="$IDPUB"\ - OR --env IDENC="$IDENC" --env IDPUBENC="$IDPUBENC"\ + --env IDENC="$IDENC" \ + --env IDPUBENC="$IDPUBENC" \ --env CFG="$CFG" \ gavinjonespf/docker-git2consul ``` + This shows how to manually specify your own config and use ssh keys to connect to the git repo.