Copyright | (c) FPComplete, 2015 |
---|---|
License | MIT |
Maintainer | Tim Dysinger <tim@fpcomplete.com> |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
This module contains specific configuration for using WAI Middleware for Consul with Github. We can configure a GitHub Webhook to POST to consul middleware. Consul middleware will push the GitHub webhook payload to Consul. Consul will let every WAI application know of the data update & each application will execute `git pull` to update their git repository contents.
┌─────────┐ ┌─────────┐ │ Github │ │ │ │ Repo │─────▶│ AWS ELB │ │ Webhook │ │ │ └─────────┘ └─────────┘ │ ┌────────────┬──────┘─ ─ ─ │ │ ▼ ▼ ▼ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │ │ │ │ │ ┌──│ WAI App │ │ WAI App │ │ WAI App │ │ │ │ │ │ │ │ │ └─────────┘ └─────────┘ └─────────┘ │ ▲ ▲ │ │ │ │ ┌────────────┴────────────┘ │ │ │ │ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │ │ │ │ │ │ └─▶│ Consul │──│ Consul │──│ Consul │ │ │ │ │ │ │ └─────────┘ └─────────┘ └─────────┘
Documentation
gitHubPullOnWebhook :: ConsulSettings Source
GitHub Webhook handler with Consul callback that does a `git pull` when fired.