# Auto-TLS (Let's Encrypt) reverse proxy → the Woodpecker server.
# Sanitized live /opt/woodpecker/Caddyfile from the CI host. Two vhosts:
#   {$WOODPECKER_DOMAIN}       → the web UI / REST API (server :8000)
#   grpc.{$WOODPECKER_DOMAIN}  → h2c to the server's agent gRPC (:9000) — remote
#                                agents (woodpecker-agent2) dial
#                                WOODPECKER_SERVER=grpc.<domain>:443 with
#                                WOODPECKER_GRPC_SECURE=true.
# Requires the domain's DNS (or <ip>.sslip.io) to point at this host + 80/443 open.
{$WOODPECKER_DOMAIN} {
	reverse_proxy woodpecker-server:8000
}

grpc.{$WOODPECKER_DOMAIN} {
	reverse_proxy h2c://woodpecker-server:9000
}
