diff --git a/docker/Caddyfile b/docker/Caddyfile index 8bf85f0..bf99417 100644 --- a/docker/Caddyfile +++ b/docker/Caddyfile @@ -1,6 +1,27 @@ +{ + # The compose port mapping publishes 443/tcp only, so QUIC never reaches + # the container. Without this, Caddy would still advertise h3 via Alt-Svc + # and clients that act on it hang for up to 30 days. + servers { + protocols h1 h2 + } +} + {$DOMAIN} { encode gzip + # Access log without client IPs — the diagnostic value here is whether a + # request arrived at all, which needs no personal data. + log { + format filter { + wrap json + fields { + request>remote_ip delete + request>client_ip delete + } + } + } + handle_path /api/* { reverse_proxy backend:3123 } diff --git a/docker/docker-compose.prod.yaml b/docker/docker-compose.prod.yaml index b9e0c2d..3cbae3c 100644 --- a/docker/docker-compose.prod.yaml +++ b/docker/docker-compose.prod.yaml @@ -4,6 +4,11 @@ services: caddy: image: caddy:2-alpine restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "20m" + max-file: "10" ports: - "80:80" - "443:443" @@ -70,4 +75,4 @@ networks: default: driver: bridge driver_opts: - com.docker.network.driver.mtu: "1450" # adjust to your indrastructure + com.docker.network.driver.mtu: "1450" # adjust to your infrastructure