version: "3.8"

services:
  cloudflared:
    image: cloudflare/cloudflared:latest
    container_name: cloudflared
    restart: unless-stopped
    command: tunnel --config /etc/cloudflared/config.yml run
    network_mode: "host"
    volumes:
      - ./config.yml:/etc/cloudflared/config.yml:ro
      # 把你的 credentials.json 放在同目录并映射进去
      - ./:/etc/cloudflared:ro

