**feat(compose):** add separate deploy and dev Docker Compose files
All checks were successful
CI / build-test (push) Successful in 1m3s

- Introduced `compose.yml` for deployment, pulling the image from the registry
- Added `compose.dev.yml` for local development, building the image from source
- Updated `README.md` and `.claude/CLAUDE.md` with instructions for both configurations
- Introduced `DB_PATH` environment variable to customize SQLite database file location
- Updated `main.go` to use `DB_PATH` with a default fallback (`./diun.db`)
This commit is contained in:
2026-02-27 15:11:47 +01:00
parent c0746a7f02
commit bf77142641
5 changed files with 40 additions and 6 deletions

View File

@@ -17,9 +17,12 @@ go run ./cmd/diunwebhook/
# Build Docker image
docker build -t diun-webhook-dashboard .
# Run with Docker Compose
# Run with Docker Compose (deploy — pulls from registry)
docker compose up -d
# Run with Docker Compose (dev — builds locally)
docker compose -f compose.dev.yml up -d
# Frontend (from frontend/ directory)
bun install # install deps
bun run dev # dev server on :5173 (proxies /api and /webhook to :8080)
@@ -56,6 +59,7 @@ The app is a Go HTTP server that receives [DIUN](https://crazymax.dev/diun/) web
**Environment variables:**
- `PORT` — listen port (default `8080`)
- `DB_PATH` — path to SQLite database file (default `./diun.db`); set to e.g. `/data/diun.db` in Docker to use a separate mountable directory
- `WEBHOOK_SECRET` — when set, every `POST /webhook` must include a matching `Authorization` header; when unset, the webhook is open (a warning is logged at startup)
**Key data flow:**