All Projects → vrongmeal → caddygit

vrongmeal / caddygit

Licence: other
Git module for Caddy v2

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to caddygit

caddy-authorize
Authorization Plugin for Caddy v2 (JWT/PASETO)
Stars: ✭ 235 (+250.75%)
Mutual labels:  caddy, caddy-plugin, caddy-module
souin
An HTTP cache system, RFC compliant, compatible with @TykTechnologies, @traefik, @caddyserver, @go-chi, @bnkamalesh, @beego, @devfeel, @labstack, @gofiber, @go-goyave, @gin-gonic, @zalando, @zeromicro, @nginx and @apache
Stars: ✭ 269 (+301.49%)
Mutual labels:  caddy, caddy-plugin, caddy-module
caddy-json-schema
JSON schema generator for Caddy v2
Stars: ✭ 63 (-5.97%)
Mutual labels:  caddy, caddy-plugin, caddy-module
caddy-exec
Caddy v2 module for running one-off commands
Stars: ✭ 48 (-28.36%)
Mutual labels:  caddy, caddy-module
caddy-trace
Request Debugging Middleware Plugin for Caddy v2
Stars: ✭ 25 (-62.69%)
Mutual labels:  caddy, caddy-plugin
caddy-ratelimit
HTTP rate limiting module for Caddy 2
Stars: ✭ 72 (+7.46%)
Mutual labels:  caddy, caddy-module
Caddy Git
git middleware for Caddy
Stars: ✭ 175 (+161.19%)
Mutual labels:  caddy
ddpt
Template for Django Projects - From development to production with Docker Swarm.
Stars: ✭ 54 (-19.4%)
Mutual labels:  caddy
Loginsrv
JWT login microservice with plugable backends such as OAuth2, Google, Github, htpasswd, osiam, ..
Stars: ✭ 1,835 (+2638.81%)
Mutual labels:  caddy
Nginx Adapter
Run Caddy with your NGINX config
Stars: ✭ 130 (+94.03%)
Mutual labels:  caddy
vim-caddyfile
Caddyfile syntax support for Vim
Stars: ✭ 25 (-62.69%)
Mutual labels:  caddy
caddy-crowdsec-bouncer
A Caddy module that blocks malicious traffic based on decisions made by CrowdSec.
Stars: ✭ 40 (-40.3%)
Mutual labels:  caddy
docker-ssl-reverse-proxy
Easy-to-use auto-SSL reverse proxy as a Docker container based on Caddy and Let’s Encrypt
Stars: ✭ 22 (-67.16%)
Mutual labels:  caddy
Cloud From Scratch
Build yourself a private self-hosted full-stack personal cloud system.
Stars: ✭ 178 (+165.67%)
Mutual labels:  caddy
caddy-security
🔐 Authentication, Authorization, and Accounting (AAA) App and Plugin for Caddy v2. 💎 Implements Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0 (Github, Google, Facebook, Okta, etc.), SAML Authentication. MFA/2FA with App Authenticators and Yubico. 💎 Authorization with JWT/PASETO tokens. 🔐
Stars: ✭ 696 (+938.81%)
Mutual labels:  caddy-plugin
Xcaddy
Build Caddy with plugins
Stars: ✭ 168 (+150.75%)
Mutual labels:  caddy
coraza-caddy
OWASP Coraza middleware for Caddy. It provides Web Application Firewall capabilities
Stars: ✭ 75 (+11.94%)
Mutual labels:  caddy
Caddy Gen
Automated Caddy reverse proxy for docker containers
Stars: ✭ 139 (+107.46%)
Mutual labels:  caddy
Caddy Authz
Caddy-authz is a middleware for Caddy that blocks or allows requests based on access control policies.
Stars: ✭ 221 (+229.85%)
Mutual labels:  caddy
caddy-altonions
Opportunistic Onions plugin for Caddy
Stars: ✭ 20 (-70.15%)
Mutual labels:  caddy

caddygit

Git module for Caddy v2

The module is helpful in creating git clients that pull from the given repository at regular intervals of time (poll service) or whenever there is a change in the repository (webhook service). On a successful pull it runs the specified commands to automate deployment.

Installation

Simply add the following import to cmd/caddy/main.go and build the caddy binary:

package main

import (
	caddycmd "github.com/caddyserver/caddy/v2/cmd"

	// plug in Caddy modules here
	_ "github.com/caddyserver/caddy/v2/modules/standard"
	_ "github.com/vrongmeal/caddygit/module/git" // Yay!!!
)

func main() {
	caddycmd.Main()
}

OR you can use xcaddy to build:

$ xcaddy build v2.1.1 \
    --with github.com/vrongmeal/caddygit/module/git

API structure

{
    // Your caddy apps.
    "apps": {
        // Git app module.
        "git": {
            // Your git clients to be deployed.
            "clients": [
                // Example client.
                {
                    // Git repository info.
                    "repo": {
                        // HTTP URL of the git repository.
                        "url": "http://github.com/vrongmeal/caddygit",

                        // Path to clone the repository in. If path specified
                        // exists and is a git repository, it simply opens the
                        // repo. If the path is not a repo and does not exist,
                        // it creates a repo in that path.
                        "path": "/path/to/clone",

                        // Branch (or tag) of the repository to clone. Defaults
                        // to `master`.
                        "branch": "my-branch",

                        // Username and secret for authentication of private
                        // repositories. If authenticating via access token,
                        // set the auth_secret equal to the value of access token
                        // and auth_user can be omitted.
                        "auth_user": "vrongmeal",
                        "auth_secret": "password",

                        // Specifies whether to clone only the specified branch.
                        "single_branch": true,

                        // Depth of commits to fetch.
                        "depth": 1
                    },
                    // Service info.
                    "service": {
                        // Type of the service.
                        // Services supported: poll, webhook
                        "type": "poll",

                        // Interval after which service will tick.
                        "interval": "10m"
                    },
                    // Commands to run after every update.
                    "commands_after": [
                        {
                            // Command to execute.
                            "command": ["echo", "hello world"],

                            // Whether to run command in background (async).
                            // Defaults to false.
                            "async": true
                        }
                    ]
                }
            ]
        }
    }
}

TODO:

  • Support for Caddyfile
  • Webhook service
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].