Docker Compose
Docker Compose is an excellent option to run multiple containers together. You can have a perfect development environment that receives webhooks directly from Stripe, Github and other services.
Webhook Relay agent can either forward requests to destinations or open bidirectional tunnels. It is a single Docker image that requires access key and secrets for authentication.
If you don't have Docker installed, we highly recommend checking resources available on https://www.docker.com/.
Webhook forwarding
Go to https://my.webhookrelay.com/buckets and create a bucket (we will call it “my-bucket“ in this example)
Configure output destination (another container or IP address where you want to forward)
Create a docker-compose.yaml file:
version: '3.2' services: relay: container_name: webhookrelay image: webhookrelay/webhookrelayd:latest network_mode: host # required if you want to access other services running on localhost (otherwise localhost would be inside this container) restart: always environment: # Authentication - RELAY_KEY=${RELAY_KEY} - RELAY_SECRET=${RELAY_SECRET} # buckets list to subscribe - BUCKETS=${BUCKETS} # Destination to filter on (if you have multiple outputs and only # wish to forward one or more from the bucket) - DESTINATION=${DESTINATION}
Create .env file:
RELAY_KEY="your-access-token-key" RELAY_SECRET="your-access-token-secret" BUCKETS=my-bucket DESTINATION=<destination output ID, name or URL to filter on>
Start Docker Compose:
docker-compose up -d
Bidirectional tunnel
Go to https://my.webhookrelay.com/tunnels and create a tunnel with your desired destination
Create a docker-compose.yml file:
version: '3.2'
services:
relay:
container_name: webhookrelay
image: webhookrelay/webhookrelayd:latest
network_mode: host
command:
- --mode
- tunnel
restart: always
environment:
# Authentication
- RELAY_KEY=${RELAY_KEY}
- RELAY_SECRET=${RELAY_SECRET}
# One or more tunnels must be set in the .env file
- TUNNELS=${TUNNELS
- REGION=us-west # eu, au, us-west (defaults to eu)
3. Create .env file:
RELAY_KEY="your-access-token-key"
RELAY_SECRET="your-access-token-secret"
TUNNELS=your-tunnel
4. Start Docker Compose:
docker-compose up -d
Last updated
Was this helpful?