You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+53-1Lines changed: 53 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,12 +37,60 @@ The `centralwebhook` tool is a simple CLI that installs or uninstalls database t
37
37
38
38
> [!NOTE]
39
39
> **Using our helper images**: We provide PostgreSQL images with the `pgsql-http` extension pre-installed:
40
-
> -`ghcr.io/hotosm/postgres:18-http` (based on vanilla PostgreSQL 18 images)
40
+
> -`ghcr.io/hotosm/postgres:14-http` (recommended default for current ODK Central installs)
41
+
> -`ghcr.io/hotosm/postgres:15-http`
42
+
> -`ghcr.io/hotosm/postgres:16-http`
43
+
> -`ghcr.io/hotosm/postgres:17-http`
44
+
> -`ghcr.io/hotosm/postgres:18-http`
41
45
>
42
46
> These images are drop-in replacements for standard PostgreSQL images and simply add the extension.
43
47
>
44
48
> **Installing manually**: If you don't wish to use these images, you must install the `pgsql-http` extension yourself. The extension may require superuser privileges to install. If you cannot install it yourself, ask your database administrator.
45
49
50
+
## ODK Central Quick Start (Recommended)
51
+
52
+
For most users running a mostly-vanilla ODK Central setup, the easiest approach is to layer this repo's compose override on top of the official Central compose file.
53
+
54
+
1. In your ODK Central repo/environment, copy the example file and set webhook variables:
docker compose -f docker-compose.yml -f /path/to/central-webhook/compose.webhook.yml up -d
81
+
```
82
+
83
+
3. Verify installation:
84
+
85
+
```bash
86
+
docker compose logs webhook
87
+
```
88
+
89
+
You should see a successful `install` message after Central and PostgreSQL are healthy.
90
+
91
+
> [!IMPORTANT]
92
+
> Use the helper image major version that matches your Central database major version. Do not point a newer PostgreSQL container at an existing older data directory without a proper PostgreSQL upgrade process.
93
+
46
94
## Usage
47
95
48
96
The `centralwebhook` tool is a CLI that installs or uninstalls database triggers. After installation, the triggers run automatically whenever audit events occur in the database.
@@ -233,6 +281,10 @@ The tool installs PostgreSQL triggers on the `audits` table that:
233
281
234
282
The triggers run automatically after installation - no long-running service is needed.
235
283
284
+
For `submission.update` events, if `instanceId` is missing from audit details in your
285
+
Central version, the trigger resolves it from `submission_defs` using
286
+
`submissionDefId`/`submissionId`.
287
+
236
288
## Development
237
289
238
290
- This package uses the standard library and a Postgres driver.
0 commit comments