blob: d1bb2a16506c27fee11e3c2fdcfc51084f2791ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
### 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
- Created `README.md` with Dokploy deployment guide, GitHub webhook setup, environment config, and networking troubleshooting
|