caddy-git




Git Plugin for Caddy v2.

Inspired by this comment.

Please ask questions either here or via LinkedIn. I am happy to help you! @greenpau

Please see other plugins:

Table of Contents

Overview

The caddy-git allows updating a directory backed by a git repo.

Getting Started

For example, the following configuration sets up a definition for authp.github.io
repo. The request to authp.myfiosgateway.com/update/authp.github.io trigger
git pull of the authp.github.io repository.

{
  git {
    repo authp.github.io {
      base_dir /tmp
      url https://github.com/authp/authp.github.io.git
      branch gh-pages
      depth 1
    }
  }
}

authp.myfiosgateway.com {
  route /update/authp.github.io {
    git update repo authp.github.io
  }
  route {
    file_server {
      root /tmp/authp.github.io
    }
  }
}

The cloning of the repository happens on startup. Additionally, the cloning
happens when /update/authp.github.io is being hit.

curl https://authp.myfiosgateway.com/update/authp.github.io

GitHub

View Github