Skip to content

practical-computer/local-webhook-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local webhook backup

This is a very small tool for setting up a webhook, and storing the payloads in a SQLite database without any processing (aside from SHA 256 HMAC signature verification).

This is useful for creating a local backup of the data that you’d get from a webhook; whether for debugging, personal edification, or locally-run data analysis.

It uses ngrok to tunnel a static URL to the app, running on your computer of choice (particularly, your home server).

The goal is that you should be able to add a configuration using .env, boot up the Docker container, and let it run in the background with minimal overhead.

Portable via Docker

There is a Dockerfile, and docker-compose.yml, making it easier to run this app locally

What makes it cool

It’s also a neat experiment in the portability & expressiveness of the Ruby language. Everything is defined in a single file, app.rb, thanks to:

The app itself isn’t that interesting; but it’s open-sourced to show how quickly you can get an idea together in Ruby. The ngrok + Docker finagling were the most time-consuming part of this project!

How to install

  1. Sign up for ngrok and claim a free static URL: https://ngrok.com
  2. Set up a new webhook for whatever service you’re trying to use, making sure it points to that new ngrok URL
  3. Make a copy of .env.template, named .env, and fill in the placeholder values with the details from your webhook and ngrok
  4. Start the server by running docker-compose up

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published