Skip to content

Commit

Permalink
docs: update readme for usage
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Jan 21, 2025
1 parent e92e00c commit 1d25c99
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
```
Expand All @@ -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
Expand Down

0 comments on commit 1d25c99

Please sign in to comment.