drud/git-sync

Name: git-sync

Owner: DRUD

Description: A sidecar app which clones a git repo and keeps it in sync with the upstream.

Forked from: kubernetes/git-sync

Created: 2017-08-01 20:11:39.0

Updated: 2017-08-01 20:11:41.0

Pushed: 2017-08-01 20:53:04.0

Homepage: null

Size: 97

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

git-sync

git-sync is a simple command that pulls a git repository into a local directory. It is a perfect “sidecar” container in Kubernetes - it can periodically pull files down from a repository so that an application can consume them.

git-sync can pull one time, or on a regular interval. It can pull from the HEAD of a branch, or from a git tag, or from a specific git hash. It will only re-pull if the target of the run has changed in the upstream repository. When it re-pulls, it updates the destination directory atomically. In order to do this, it uses a git worktree in a subdirectory of the --root and flips a symlink.

Usage
ild the container
 container REGISTRY=registry TAG=tag

n the container
er run -d \
-v /tmp/git-data:/git \
registry/git-sync:tag \
    --repo=https://github.com/kubernetes/git-sync
    --branch=master
    --wait=30

n an nginx container to serve the content
er run -d \
-p 8080:80 \
-v /tmp/git-data:/usr/share/nginx/html \
nginx

Analytics


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.