services:

  caddy:
    image: caddy-cloudflare
    restart: always
    ports:
      - 80:80
      - 443:443
      - 443:443/udp
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile
      - caddy_data:/data
      - caddy_config:/config
    environment:
      CF_ZONE_READ: ${CF_ZONE_READ}
      CF_DNS_EDIT: ${CF_DNS_EDIT}
    network_mode: host
    extra_hosts:
      - host.docker.internal:host-gateway
    labels:
      - diun.enable=true
volumes:
  caddy_data:
  caddy_config:
