ryuupendragon 19348dc1cb
Build and Push Docker Images / build (map[context:caddy-cloudflare dockerfile:caddy-cloudflare/Dockerfile name:cloudflare]) (push) Successful in 1h26m48s
Build and Push Docker Images / build (map[context:caddy-cloudflare-crowdsec dockerfile:caddy-cloudflare-crowdsec/Dockerfile name:cloudflare-crowdsec]) (push) Successful in 1h35m37s
Build and Push Docker Images / build (map[context:caddy-cloudflare-ddns dockerfile:caddy-cloudflare-ddns/Dockerfile name:cloudflare-ddns]) (push) Successful in 1h28m42s
Build and Push Docker Images / build (map[context:caddy-cloudflare-ddns-crowdsec dockerfile:caddy-cloudflare-ddns-crowdsec/Dockerfile name:cloudflare-ddns-crowdsec]) (push) Successful in 1h36m15s
Build and Push Docker Images / build (map[context:caddy-crowdsec dockerfile:caddy-crowdsec/Dockerfile name:crowdsec]) (push) Successful in 55m34s
Squashed commit of the following:
commit 2e64ea66a5
Author: Renovate Bot <renovate@sh.ryuu.in>
Date:   Thu May 14 08:32:58 2026 +0000

    Update caddy Docker tag to v2.11.3
2026-05-23 17:17:35 +05:30
2025-08-20 17:54:31 +05:30
2025-08-23 21:36:49 +05:30
2025-09-23 16:54:08 +00:00

Caddy

Custom Caddy Builds

Create CLOUDFLARE_API_TOKEN with below permissions.

  • Zone.Zone:Read
  • Zone.DNS:Edit

Cloudflare ACME

{
        email username@domain.com
        acme_dns cloudflare {$CLOUDFLARE_API_TOKEN} 
}

Dynamic DNS

{
        dynamic_dns {
                provider cloudflare {$CLOUDFLARE_API_TOKEN}
                domains {
                        example.com @ subdomain
                }
                check_interval 5m
                versions ipv4
                ttl 1m
        }
}

CrowdSec

{
        crowdsec {
                api_url http://crowdsec:8080
                api_key {$CROWDSEC_API_KEY}
                ticker_interval 3s
                appsec_url http://crowdsec:7422
                #disable_streaming
                #enable_hard_fails
        }
}

#Add Logging to Caddy
(logging) {
        log {
                output file /logs/access.log {
                        roll_size 10MB # Create new file when size exceeds 10MB
                        roll_keep 5 # Keep at most 5 rolled files
                        roll_keep_for 336h # Delete files older than 14 days
                        roll_uncompressed
                }
        }
}

ryuu.in www.ryuu.in {
        import logging
        route {
                crowdsec
        }
        redir https://git.ryuu.in/ryuupendragon permanent
}

*.ryuu.in {
        import logging

        @a host a.ryuu.in
        handle @a {
                route {
                        crowdsec
                }
                reverse_proxy ip:port
        }

        @b host b.ryuu.in
        handle @b {
                route {
                        crowdsec
                }
                reverse_proxy ip:port
        }

        # Fallback for otherwise unhandled domains
        handle {
                route {
                        crowdsec
                }
                abort
        }
}

Disclaimer: Some inspirations were taken from serfriz's custom caddy builds for folder structure, parsing caddy version from Dockerfile, and readme. No code has been directly copied unless otherwise specified. This project is not affiliated with or endorsed by serfriz.

S
Description
No description provided
Readme Apache-2.0 296 KiB
Languages
Dockerfile 100%