From 56beeb53c2fa4537a361217417481a54fc6c4b4b Mon Sep 17 00:00:00 2001 From: traveler Date: Tue, 24 Feb 2026 19:45:41 -0600 Subject: [PATCH] vnm --- swarm/stack/caddy/Caddyfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/swarm/stack/caddy/Caddyfile b/swarm/stack/caddy/Caddyfile index 7e127b7..85f4b5e 100644 --- a/swarm/stack/caddy/Caddyfile +++ b/swarm/stack/caddy/Caddyfile @@ -1,3 +1,32 @@ +# ───────────────────────────────────────────────────────────────────────────── +# GLOBAL BLOCK — add this at the very top before any snippets +# ───────────────────────────────────────────────────────────────────────────── + +{ + crowdsec { + api_url http://crowdsec:8080 + api_key {$CROWDSEC_API_KEY} + } + log { + output file /var/log/caddy/access.log { + roll_size 50mb + roll_keep 5 + } + format json + } +} + +# ───────────────────────────────────────────────────────────────────────────── +# CROWDSEC SNIPPET — add alongside existing auth snippets +# ───────────────────────────────────────────────────────────────────────────── + +(crowdsec) { + route { + crowdsec + } +} + + (authentik) { route /outpost.goauthentik.io/* { reverse_proxy http://authentik:9000