summaryrefslogtreecommitdiffhomepage
path: root/.rules/changelog/2026-03/18/01.md
blob: 5f700ca178c17caff12c85293c78c0acfd4a916d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
### Webhook Forwarder — Initial Implementation

- Created Rust project with `hyper`, `tokio`, `http-body-util`, `hyper-util`, `bytes` dependencies
- Implemented `src/main.rs`: minimal HTTP server that forwards webhook POST requests
  - `POST /<token>` → `{DOKPLOY_BASE_URL}/api/deploy/<token>`
  - `POST /compose/<token>` → `{DOKPLOY_BASE_URL}/api/deploy/compose/<token>`
  - Forwards all headers (except Host) and body to upstream
  - Returns upstream response (status + body) to caller
  - Rejects non-POST with 405, invalid paths with 404
  - Logs all requests to stderr
  - Configurable via `DOKPLOY_BASE_URL` (default: `http://100.102.55.49:3000`) and `PORT` (default: `8080`)
- Created `Dockerfile`: multi-stage build (`rust:1-alpine3.21` → `scratch`) for minimal image (~3-5 MB)
- Created `.dockerignore` to minimize Docker build context
- Created `bin/setup.sh` for project scaffolding
- Created `bin/test.sh` for local testing
- Created `.rules/plan/webhook-forwarder.md` with full implementation plan