compute/todo.md
... ...
@@ -9,9 +9,19 @@ Sync from github from another container, shared volume with https://github.com/b
9 9
Set the secret from an env var in ansible, write to file, mount file in container, read file from the webhook main
10 10
createdroplet -t permanent -t wiki -i centos-7-x64 -r lon1 -n wiki-lon1
11 11
Make github-webhook pull whatever it's given down to /repos/\<reponame>.
12
-Push the github-webhook container to docker hub. github-puller or someshit.
12
+
13
+Push the github-webhook container to docker hub. github-webhook-pull-master or someshit.
13 14
Need deploy keys mounted in the webhook container somewhere.
14 15
Gollum-in-docker here https://github.com/gollum/gollum/wiki/Gollum-via-Docker
15 16
Mount /repos/\<wiki> as /wiki in the gollum container and serve the wiki dir in there.
16 17
17
-flask six
... ...
\ No newline at end of file
0
+flask six
1
+```
2
+if data["ref"] == "refs/heads/master":
3
+ repo = data["repository"]["name"]
4
+ url = data["clone_url"]
5
+ if not os.path.isdir("/repos/" + repo + "/.git"):
6
+ subprocess.run(['/usr/bin/git', 'clone', url, "/repos/" + repo])
7
+ else:
8
+ subprocess.run(['/usr/bin/git', 'pull'], cwd="/repos/" + repo)
9
+```
... ...
\ No newline at end of file