weblug/README.md

47 lines
2 KiB
Markdown
Raw Permalink Normal View History

2022-02-08 08:55:38 +00:00
# weblug
`weblug` is is a configurable webhook receiver that allows users to run arbitrary programs and script when a webhook is triggered.
2022-02-08 10:50:38 +00:00
The configuration happens via a [yaml file](weblug.yml). Read the [usage caveats](#caveats)!
2022-12-29 15:12:39 +00:00
`weblug` supports multiple webhooks via different URL paths, concurrency limitations, background execution and running webhooks as separate user (`uid`/`gid`).
2022-02-08 10:50:38 +00:00
## Usage
Webooks are defined via a yaml file. See [weblug.yml](weblug.yml) for an example configuration. Pass the yaml file(s) to `weblug` to starting the webserver and waiting for incoming webhooks:
2022-02-08 10:50:38 +00:00
./weblug YAML-FILE
`weblug` can run as any user, however for custom `uid`/`gid` webhooks, the program needs to run as root.
2022-12-29 15:12:39 +00:00
### Caveats
1. `weblug` does not support https encryption
weblug is expected to run behind a http reverse proxy (e.g. `apache` or `nginx`) which handles transport encryption. The program it self does not support https, nor are there any plans to implement this in the near future.
CAVE: Don't expose secrets and credentials by running this without any transport encryption!
2. Do not run this without reverse proxy
`weblug` relies on the standart go http implementation. To avoid a whole class of security issues, `weblug` should never run on the open internet without a http reverse proxy.
3. `weblug` runs as root, when using custom UID/GIDs
In it's current implementation, `weblug` requires to remain running as root without dropping privileges when using custom UID/GIDs.
2022-02-08 10:50:38 +00:00
## Build
make # Build weblug
2022-12-29 15:12:39 +00:00
make static # Make a static binary
Alternatively you there is also a [Taskfile](https://taskfile.dev)
task
task static # Build static binary
## Run as systemd unit
This repository provides an example [weblug.service](weblug.service), which can be used to start `weblug` as systemd service.
This file can be placed in `/etc/systemd/system/weblug.service` and in conjunction with an adequate `weblug.yml` file e.g. in `/etc/weblug.yml` this provides a way of running weblug as a native systemd service.