# Every service defined here is a fully self-contained bot: it runs its own # Cloudflare WARP client inside the container, so each bot gets its own VPN # tunnel and its own Cloudflare egress IP. To run a second bot, copy the # `bot` service block, give it a different name, env file and volume. x-warp-bot: &warp-bot build: context: . dockerfile: docker/Dockerfile args: WARP_VERSION: "2026.7.1377.0" image: discordbot-cloudflarewarp:latest restart: unless-stopped # WARP needs to create a TUN device and manage routes inside the container. cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun sysctls: net.ipv6.conf.all.disable_ipv6: 0 net.ipv4.conf.all.src_valid_mark: 1 logging: driver: json-file options: max-size: "10m" max-file: "3" services: bot: <<: *warp-bot container_name: discordbot-warp env_file: .env volumes: - warp-data-bot:/var/lib/cloudflare-warp # Example second bot with its own WARP tunnel and its own token: # bot2: # <<: *warp-bot # container_name: discordbot-warp-2 # env_file: .env.bot2 # volumes: # - warp-data-bot2:/var/lib/cloudflare-warp volumes: warp-data-bot: # warp-data-bot2: