services:
  caddy:
    image: caddybuilds/caddy-cloudflare:alpine
    container_name: caddy
    restart: always
    cap_add:
      - NET_ADMIN # Grant network administration capabilities  
    ports:
      - 80:80
      - 443:443
      - 443:443/udp
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile
      - ./site:/srv
      - ./data:/data
      - ./config:/config
      - ./logs:/var/log/caddy
    environment:
      - CLOUDFLARE_API_TOKEN=3Jt7AT2qSFrEVe-z0UEieQ_DgcDF0--2beMA568B
    networks:
      - caddy-network
networks:
  caddy-network:
    driver: bridge  
