- 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>
56 lines
2.1 KiB
YAML
56 lines
2.1 KiB
YAML
# Infrastructure Configuration
|
|
|
|
# Docker configuration
|
|
docker:
|
|
network_name: "lava"
|
|
stacks_path: "/opt/stacks"
|
|
hairpin_ip: "172.20.0.5" # Caddy's fixed IP
|
|
# Shared network layout. Docker only hands out addresses from ip_range,
|
|
# so 172.20.0.x is kept free for fixed IPs and can't be taken by others.
|
|
subnet: "172.20.0.0/16"
|
|
gateway: "172.20.0.1"
|
|
ip_range: "172.20.128.0/17"
|
|
gitea_ip: "172.20.0.6" # fixed so the ufw-docker SSH rule stays valid
|
|
|
|
# SMTP configuration
|
|
smtp:
|
|
host: "smtp.resend.com"
|
|
username: "resend"
|
|
from_domain: "{{ email_domains.updates }}"
|
|
|
|
# Network configuration
|
|
network:
|
|
netcup_ip: "152.53.36.98"
|
|
docker_host_ip: "100.70.169.99"
|
|
tailscale_hostname: "netcup.porgy-porgy.ts.net"
|
|
|
|
# Paths
|
|
paths:
|
|
stacks: "{{ docker.stacks_path }}"
|
|
|
|
# Notification services
|
|
notifications:
|
|
appriseapi_endpoint: "http://apprise:8000/notify/apprise"
|
|
# Pocket ID group allowed through Tinyauth to admin pages.
|
|
tinyauth_admin_group: admins
|
|
|
|
# Custom Caddy (repo phil/caddy-custom: CrowdSec bouncer + AppSec + rate
|
|
# limiting, rebuilt daily, rolled out by dockcheck).
|
|
# caddy_custom: false = stock caddy:2-alpine and no plugin directives in the
|
|
# Caddyfile; set it back to false to roll everything back in one deploy.
|
|
# The other flags stage the rollout and only matter when caddy_custom is on.
|
|
caddy_custom: false
|
|
caddy_custom_image: "{{ subdomains.git }}/phil/caddy"
|
|
caddy_custom_tag: "2" # pin to "<ver>-<fingerprint>" to hold a build
|
|
caddy_image: "{{ (caddy_custom_image ~ ':' ~ caddy_custom_tag) if caddy_custom else 'caddy:2-alpine' }}"
|
|
caddy_crowdsec_enforce: false # block IPs CrowdSec has banned
|
|
caddy_appsec: false # AppSec virtual patching on each request
|
|
caddy_ratelimit: false # per-IP limits on login POSTs
|
|
|
|
# Never banned by CrowdSec, never rate limited.
|
|
crowdsec_allowlist:
|
|
- "{{ docker.subnet }}" # containers hairpinning through Caddy
|
|
- "100.64.0.0/10" # Tailscale IPv4
|
|
- "fd7a:115c:a1e0::/48" # Tailscale IPv6
|
|
- "{{ network.netcup_ip }}" # the server itself
|