From c1f23220fabb7a0344705069a194b15826b6e3bd Mon Sep 17 00:00:00 2001 From: Bastien Riviere Date: Mon, 11 Sep 2023 19:58:02 +0200 Subject: [PATCH] docs: add README instructions --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 54244ce..569830c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,48 @@ # ntfy-bridge -Bridge for various implementations to publish to ntfy. \ No newline at end of file +Bridge for various implementations to publish to ntfy. + +## Installation + +Using go: + +```sh +go install forge.babariviere.com/babariviere/ntfy-bridge@latest +``` + +Or using docker: + +```sh +docker pull forge.babariviere.com/babariviere/ntfy-bridge:latest +``` + +Binaries are also avaiable in the [release section](https://forge.babariviere.com/babariviere/ntfy-bridge/releases). + +## Usage + +First, you need to create a configuration file. A sample one is provided [here](./config.example.scfg). + +For now, we have these handler types: +- `flux`: handle notification from [Flux](https://fluxcd.io) +- `discord_embed`: handle preformated notification from discord embeds (see [embed object](https://discord.com/developers/docs/resources/channel#embed-object)) +- `alertmanager`: handle notification from alertmanager using [webhook_config](https://prometheus.io/docs/alerting/latest/configuration/#webhook_config) + +Once you have created your config file, you can either put it in these directories: +- `/etc/ntfy-bridge/config.scfg` +- `$HOME/.ntfy-bridge/config.scfg` +- `$HOME/.config/ntfy-bridge/config.scfg` +- `config.scfg` (current directory) + +Then, you can simply run the binary with either the native binary: + +```sh +./ntfy-bridge +``` + +Or via docker: + +```sh +docker run -v config.scfg:/etc/ntfy-bridge/config.scfg -p 8080 forge.babariviere.com/babariviere/ntfy-bridge:latest +``` + +Sample config for kubernetes can be found in [./k8s/](./k8s/) directory.