Files
ansible/roles/docker/templates/caddy-compose.yml.j2
T
PhilandClaude Opus 5.5 48a4e48b84 CrowdSec (detection only) and staged custom-Caddy plumbing
- crowdsec stack on lava reading Caddy's access log (logs/ subpath only),
  collections caddy, http-cve, base-http-scenarios, appsec-virtual-patching;
  AppSec listener on :7422; allowlist for lava, Tailscale, the server
- caddy_custom switch (image + plugin directives), staged by
  caddy_crowdsec_enforce / caddy_appsec / caddy_ratelimit; all off, so the
  rendered config is unchanged in effect
- (protect) on every site, (ratelimit_login) on login paths, both empty
  until enabled; caddy recreated when compose.yml or .env changes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 12:22:15 -07:00

29 lines
583 B
Django/Jinja

services:
caddy:
image: {{ caddy_image }}
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp"
{% if caddy_custom %}
env_file: .env # CROWDSEC_API_KEY
{% endif %}
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./site:/srv
- caddy_data:/data
- caddy_config:/config
labels:
mag37.dockcheck.update: true
networks:
default:
ipv4_address: {{ docker.hairpin_ip }}
volumes:
caddy_data:
caddy_config:
networks:
default:
external: true
name: {{ docker.network_name }}