GithubHelp home page GithubHelp logo

isabella232 / multi-git-sync Goto Github PK

View Code? Open in Web Editor NEW

This project forked from weaveworks/multi-git-sync

0.0 0.0 0.0 34 KB

Sync many Git repositories based on a YAML config file

License: Apache License 2.0

Makefile 2.36% Haskell 88.74% Shell 8.90%

multi-git-sync's Introduction

multi-git-sync

Circle CI

Sidecar to keep multiple git repositories in sync

What it is

Synchronises multiple git repositories to an area on local disk, based on configuration in a YAML file.

Why you might want it

Excellent question!

How to use it

Create a configuration YAML file like this:

root: /var/lib/data/git-repositories
interval: 30  # pull every 30 seconds
repos:
  dotfiles:
    url: [email protected]:jml/dotfiles.git
  emacs-configuration:
    url: [email protected]:jml/emacs-configuration.git

And store it in a path like /etc/multi-git-sync.yaml (the exact path doesn't matter).

Natively

Build and install the code with stack install and then run with:

multi-git-sync --port 8080 --config-file=/etc/multi-git-sync.yaml --ghc-metrics +RTS -N -T -RTS

This will start a server that you can reach at http://localhost:8080/

You can browse to that server to see the status of the Git repositories that have been pulled.

With Docker

[untested]

Create a Docker image with:

make image

The last line of successful make output will be the name of the image, e.g. multi-git-sync:master-1a2b3cd.

You can then run the image like so:

docker run -p 8080:80 multi-git-sync:master-1a2b3cd --port 80 +RTS -N

And you can reach the server at http://localhost:8080/ if you are running Docker natively. If you're on a Mac and using Docker Machine, you can run:

open http://$(docker-machine ip):8080/

To browse to the running server.

TODO

Service

  • Serve the synced repos as static web pages
  • Include last time synced in repo information
  • Include last time config change in config information
  • Serve current system time in config information

Git

  • If repo sync successfully but working tree fails, retry working tree creation
  • Support handling URL change
  • Make sure Git commands are async exception safe

Users

  • Confirm the README instructions for Docker

multi-git-sync's People

Contributors

jml avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.