GithubHelp home page GithubHelp logo

dokku-webhooks's Introduction

dokku webhooks plugin

This project is a work-in-progress and not usable yet!

dokku-webhooks lets you issue custom dokku commands by triggering webhooks. The core functionality is implemented and working, but the glue that holds everything together is not all there yet. The following things still need to happen before this plugin is usable in production:

  • Implement log recording for executed commands
  • Add an install script
  • Implement listen and stop commands
  • Improve overall logging quality
  • Add tests for server and cli commands
  • Add documentation for installation and usage

The workflow will look like this:

  • Install the plugin using dokku plugin:install https://github.com/happenslol/dokku-webhooks.git
  • Enable the webhook server: dokku webhooks:listen
  • Generate a secret for your app: dokku webhooks:gen-secret <app> --length 64
  • Enable webhooks for your app: dokku webhooks:enable <app>
  • Create a webhook. The command you pass can contain variables that will be substituted with url query params you pass. Additionally, there's available params like the app name, which enable you to easily write commands.
# A post request to /foo/webhook1 with the secret as the body will trigger the command ps:rebuild foo
dokku webhooks:create foo webhook1 "ps:rebuild #app"

# Posting the secret to /foo/webhook2?cmd=stop will run ps:stop foo
dokku webhooks:create foo webhook2 "ps:#cmd #app"
  • If you want to manually trigger a webhook to test if it works, you can run dokku webhooks:trigger foo webhook2 --args "cmd=stop"
  • Using dokku webhooks:logs foo webhook2, you can see the most recent output of the command

dokku-webhooks's People

Contributors

happenslol avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.