Skip to content

Simple docker container for syncing changes to a Git repository.

License

Notifications You must be signed in to change notification settings

comigor/docker-git-sync

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-git-sync

This project is a simple script and Docker container for detecting changes to a given directory and automatically syncing (pulling & commiting and pushing any changes to that directory). This can be useful for keeping configuration files in version control automatically for applications that like to change them.

Build

docker build -t 'git-sync:latest' .

Usage

docker run --name git-sync -d  \
    -e GIT_REPO="ssh://[email protected]/user/repository.git" \
    -e GIT_BRANCH="master" \
    -e GIT_ORIGIN="origin" \
    -e COMMIT_USER="Git Service" \
    -e COMMIT_EMAIL="[email protected]" \
    -e WORKING_DIR="/git" \
    -e SSH_KEY="<private key>" \
    -e FILES_TO_COMMIT="." \
    -e SLEEP_INTERVAL="600" \
    -v /path/to/git/repo:/git git-push:latest

About

Simple docker container for syncing changes to a Git repository.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 86.0%
  • Dockerfile 14.0%