Skip to content

Open source webhook gateway (serverlus for the rest of us)

License

Notifications You must be signed in to change notification settings

mikermcneil/hydroplane

Repository files navigation

hydroplane

Write and maintain code for automations in a webhook gateway built on Sails.

image image

The idea is you change the routes in that textarea and then hit save and then it's live.

(a Sails v1 application)

Getting started

  1. Fork this repo
  2. Deploy it, using whatever database you like
Things you won't need:
  • You will only need one compute instance, so you can get away without Redis this time if you want. (But setting up Redis will mean you won't get randomly logged out, which is nice. I would set up Redis.)
  • You probably won't need password reset or contact form emails, so you can skip Mailgun.
  • Unless you're trying to charge for this, you won't need payments either, so skip Stripe.

Deployment

You can deploy hydroplane however/wherever you want for your own uses.

For convenience, this repo also includes a built-in way on top of Heroku that's handy if you're working on the underlying source code.

  1. Set GitHub Secrets:
  • you can set these in "Settings > Secrets" in the GitHub UI, as of like Feb 2021. They'll probably change it at some point but, you've got this! They're lurking in the UI somewhere.
  • HEROKU_API_TOKEN_FOR_DEPLOYMENT (your heroku api token)
  • HEROKU_EMAIL_FOR_DEPLOYMENT (your heroku login email)
  1. Create a heroku app, set up a database, add redis and Papertrail too, if you can be bothered. Free tiers are fine. (If you're using a SQL database, use a wipe script to set up the tables- e.g. set database url in package.json and then sails run wipe
  • Example of working add-ons and config (you can also use a free tier dyno if you don't mind it going to sleep and then hanging. You probably want to pay them though, because a lot of automation systems you might be integrating with will time out.)
    • image
    • image
  1. Optional: npm install your database adapter and configure it in config/env/production.js. (This is set up to use sails-mysql in production already by default, so if you're cool with that, you don't need to install anything.)
  2. Configure the app to know its own URL in the production config (baseUrl and sockets.onlyAllowOrigins). Note that other settings necessary for Heroku (secure cookies and trust proxy config) are already enabled.
  3. Customize the github action in this repo to make it point at your heroku app (FUTURE: change the action so it uses a github secret for the app name too, so that this step can be simplified)
  4. Customize the github action in this repo to point at your repo (it has a failsafe at the top to prevent deploying on every 3rd party PR)
  5. Push something to master and it will deploy.
  6. Once it's working, login with [email protected]/abc123 and then change your password.

Links

Version info

This app was originally generated on Sat Feb 13 2021 15:02:27 GMT-0600 (Central Standard Time) using Sails v1.4.0.

This project's boilerplate is based on an expanded seed app provided by the Sails core team to make it easier for you to build on top of ready-made features like authentication, enrollment, email verification, and billing. For more information, drop us a line.

About

Open source webhook gateway (serverlus for the rest of us)

Resources

License

Stars

Watchers

Forks

Packages

No packages published