Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 1.45 KB

README.md

File metadata and controls

16 lines (11 loc) · 1.45 KB

gitsync-container-volume

A simple container written in pure go to keep a directory up-to-date with a remote git repository.

Does the equivalent of a git clone, followed by repeated git pull at a specified interval into the directory /data using the go-git project.

This is useful as a sidecar container to share files stored in a git repository with other containers via shared volume.

Configuration is accomplished using these environment variables:

Variable Required Default Description
REPOSITORY_URL X Repository root URL. example: https://github.com/USACE/gitsync-container-volume
REMOTE_NAME "origin" Remote name. example: origin
REMOTE_BRANCH X Branch to clone, pull. example: develop
PULL_INTERVAL "2m" Interval between git pulls after git clone; Supports Go duration strings