Skip to content

Quickstart (Docker Compose)

This is the fastest way to run DiffVer locally.

Prereqs

  • Docker + Docker Compose

Run

cp .env.example .env
docker compose up --build -d

Services: - API: http://localhost:8000 - Postgres: localhost:5432

Health check

curl -s http://localhost:8000/metrics | head

Create a scan (smoke)

curl -s http://localhost:8000/v1/scans \
  -H 'Authorization: Bearer tenant-token' \
  -H 'Idempotency-Key: docker-smoke-1' \
  -H 'Content-Type: application/json' \
  -d '{
    "tenant_id": "t_local",
    "source": "api",
    "repo": "org/local",
    "diff": "+ print(\"hello from docker\")",
    "policy_profile": "strict"
  }'

Worker

For production-ish usage, run the worker as a separate process (or container):

python -m diffver.worker

See README.md for the full list of worker configuration knobs.