{"id":20471783,"url":"https://github.com/signiant/git-syncer","last_synced_at":"2025-03-05T13:44:36.601Z","repository":{"id":93380949,"uuid":"90036234","full_name":"Signiant/git-syncer","owner":"Signiant","description":"Stay in sync with a git repo","archived":false,"fork":false,"pushed_at":"2017-05-11T20:39:08.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-16T02:23:53.314Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Signiant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-02T13:24:31.000Z","updated_at":"2022-02-22T18:18:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c65c611-9f42-4ef8-af6c-97e5c17cdda8","html_url":"https://github.com/Signiant/git-syncer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fgit-syncer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fgit-syncer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fgit-syncer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fgit-syncer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Signiant","download_url":"https://codeload.github.com/Signiant/git-syncer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242039536,"owners_count":20061924,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T14:17:13.892Z","updated_at":"2025-03-05T13:44:36.596Z","avatar_url":"https://github.com/Signiant.png","language":"Shell","readme":"# git-syncer\nStay in sync with a git repo\n\n## Variables\n\n- VERBOSE - enable more logging if set to 1\n- UMASK - optional UMASK value to use for new files/folders\n- FREQUENCY - How often to check for changes (in seconds). Default is 300 seconds (5 minutes).\n- REPO_URL - URL to the git repo to monitor\n- REPO_BRANCH - Branch to track. Default is master\n- GIT_CRED - path to where to find .git-credentials file to use (defaults to /credentials/.git-credentials)\n    - only required for private repos\n    - be sure to mount folder with .git-credentials file to whatever path is specified here\n- MARKER_FILE - path to file to touch if changes are detected in the git repo, if not provided - no marker file created\n\n\n## Example Docker runs\n\n\nThis example mounts the local folder 'mylocaldir/repo' into the container at '/repo-dir' for use as the Repo Folder.\nA .git-credentials file can be found in the local 'credentials-dir', so 'credentials-dir' is mounted at '/credentials'\ninside the container. The syncer will check the upstream repo (https://github.com/Signiant/git-syncer.git) every 10 \nminutes (600 seconds). Use a UMASK value of 000 for files and folders created. No new marker file will be created\nif/when new changes are pulled down.\n\n\n````\ndocker run -d   -e \"FREQUENCY=600\" \\\n -e \"VERBOSE=1\" \\\n -e \"UMASK=000\" \\\n -e \"REPO_URL=https://github.com/Signiant/git-syncer.git \\\n -v credentials-dir:/credentials \\\n -v mylocaldir/repo:/repo-dir \\\n signiant/git-syncer\n````\n\nThis example mounts the local folder 'mylocaldir/repo' into the container at '/repo-dir' for use as the Repo Folder.\nNo credentials file is mounted, because this is a public repo that doesn't need credentials. \nThe syncer will check the upstream repo (https://github.com/Signiant/git-syncer.git) every minute\n(60 seconds). A marker file WILL be created (at /monitor/NEWCONTENT) if/when new changes are pulled down.\nSince '/monitor' is mounted to 'mylocaldir', a NEWCONTENT file will get created in that folder locally.\n\n\n````\ndocker run -d -e \"FREQUENCY=60\" \\\n        -e \"REPO_URL=https://github.com/Signiant/git-syncer.git \\\n        -e \"MARKER_FILE=/monitor/NEWCONTENT\"\n        -v mylocaldir/repo:/repo-dir \\\n        -v mylocaldir:/monitor \\\n        signiant/git-syncer\n````\n\n\nThis example combines a docker container created with the signiant/aws-parameter-syncer docker image, to keep the \n.git-credentials file in sync (in case there is a rotation policy in place for the password for example). The \n'/credentials' volume is exposed in the aws-parameter-syncer image, so let's assume there is already a docker container \nrunning with a name of 'credentialsSyncer' that is using that image, and that it syncs a parameter to a .git-credentials \nfile in /credentials. We simply need to use the --volumes-from directive to get the /credentials volume shared into this \ncontainer.  In this case, the Repo Folder (/repo-dir) is not mounted locally. The syncer will check the upstream repo \n(https://github.com/Signiant/git-syncer.git) every minute (60 seconds) for new commits to the 'non-master-branch'. A \nmarker file WILL be created (at /monitor/NEWCONTENT) if/when new changes are pulled down. Since '/monitor' is mounted \nto 'mylocaldir', a NEWCONTENT file will get created in that folder locally.\n\n\n````\ndocker run -d -e \"FREQUENCY=60\" \\\n        -e \"REPO_URL=https://github.com/Signiant/git-syncer.git \\\n        -e \"REPO_BRANCH=non-master-branch \\\n        -e \"MARKER_FILE=/monitor/NEWCONTENT\"\n        --volumes-from credentialsSyncer\n        -v mylocaldir:/monitor \\\n        signiant/git-syncer\n````\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigniant%2Fgit-syncer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigniant%2Fgit-syncer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigniant%2Fgit-syncer/lists"}