From 1d25c99af8efb4026ef1ad55e587630bb987ec8e Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Tue, 21 Jan 2025 16:35:06 +0000 Subject: [PATCH] docs: update readme for usage --- README.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5f7dfd4..d723897 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,15 @@ Call a remote API on ODK Central database events: ## Usage -From command line: +### Binary + +Download the binary for your platform from the +[releases](https://github.com/hotosm/odk-webhook/releases) page. + +Then run with: ```bash -odkhook \ +./odkhook \ -db 'postgresql://{user}:{password}@{hostname}/{db}?sslmode=disable' \ -webhook 'https://your.domain.com/some/webhook' ``` @@ -20,7 +25,20 @@ odkhook \ > > Use the -trigger flag to modify this behaviour. -From code: +### Docker + +```bash +docker run -d ghcr.io/hotosm/odk-webhook:latest \ + -db 'postgresql://{user}:{password}@{hostname}/{db}?sslmode=disable' \ + -webhook 'https://your.domain.com/some/webhook' +``` + +> [!NOTE] +> Alternatively, add to your docker compose stack. + +### Code + +Usage via the code / API: ```go package main