proomt

Search

Search posts, papers, and topics

All posts

SitePoint14 min readtutorialintermediate

Setting Up Cloudflare Tunnels with Docker Compose for Persistent Webhook Debugging

Summary

A step‑by‑step tutorial showing how to run a persistent, free Cloudflare Tunnel alongside a TypeScript/Node.js webhook consumer in Docker Compose, replacing ngrok for local webhook debugging.

  • ngrok free tier is unsuitable for webhook development due to random subdomains, session timeouts, and rate limits.
  • Cloudflare Tunnels (cloudflared) provide a zero‑trust, outbound‑only tunnel that persists as long as the container runs, with optional named tunnels for stable URLs.
  • The article ships a full Docker‑Compose stack: a `cloudflared` service forwarding traffic to a `webhook` service built from a multi‑stage Dockerfile.
  • The webhook consumer is a minimal Express app in TypeScript that validates HMAC‑SHA256 signatures using a constant‑time comparison and preserves the raw request body for accurate verification.

Local webhook testing is a common pain point; a free, containerized, persistent tunnel removes the need for manual URL updates and session restarts, speeding up integration work with services like Stripe, GitHub, or Slack.

6/10

Related reading

  1. Cloudflare Quick Tunnels

    Cloudflare Quick Tunnels let you expose a local service via an outbound‑only connection to Cloudflare’s edge network. The service gets a public URL (anycast across 335+ cities) with automatic TLS, DDoS protection, and no inbound ports. It’s positioned for short‑lived agents, webhooks, and testing loops, with JSON health output and no config files.

    Hacker News front pagecloudflare.com1 minreleaseHN831316
  2. Using Docker Compose for NodeJS Development

    This tutorial demonstrates how to set up a Node.js application with a PostgreSQL database using Docker Compose for local development. It covers creating a Dockerfile for the Node.js app and defining both services in a docker-compose.yml file, including volume mounts and environment variables.

    Codeshipcloudbees.com9 min
  3. Cloudflare Introduces the Agent Development Lifecycle to Replace Traditional SDLC

    Cloudflare’s Agent Development Lifecycle (ADLC) replaces the classic SDLC with an autonomous, event‑driven workflow system that lets AI agents handle code generation, testing, deployment, and maintenance. The platform builds on Cloudflare Workflows and the new @cloudflare/ci library to spin up containers, run headless browsers, and chain steps with caching and credential support. Observability is…

    InfoQinfoq.com2 min
  4. Using Docker Compose for PHP Development

    This tutorial demonstrates how to set up a PHP/Laravel/PostgreSQL development environment using Docker and Docker Compose. It covers creating a Dockerfile for the PHP application and defining services for NGINX, the PHP app, and PostgreSQL in a docker-compose.yml file.

    Codeshipcloudbees.com10 min
  5. Building Composite Model Context Protocol (MCP) Gateways in TypeScript

    Step‑by‑step tutorial showing how to build a stateless composite Model Context Protocol (MCP) gateway in TypeScript using Hono, Zod, and the MCP SDK. It covers config‑driven upstream registration, namespaced tool discovery, JSON‑RPC routing, per‑tool auth middleware, and a token‑bucket rate limiter, with concrete code snippets and design trade‑offs.

    SitePointsitepoint.com16 min