api-reference/decision-engine-api-reference/local-setup.md
This is the canonical local startup guide for Decision Engine.
Required for source runs:
just — required for PostgreSQL source runs (just migrate-pg); MySQL can use diesel migration run directlyDecision Engine supports two local tracks:
Default tags used in this repo:
DECISION_ENGINE_TAG=v1.4GROOVY_RUNNER_TAG=v1.4You must pass at least one profile.
| Profile | DB | Includes |
|---|---|---|
postgres-ghcr | PostgreSQL | API + PostgreSQL + Redis + Kafka + ClickHouse + PG migrations |
postgres-local | PostgreSQL | API + PostgreSQL + Redis + Kafka + ClickHouse + PG migrations |
mysql-ghcr | MySQL | API + MySQL + Redis + Kafka + ClickHouse + MySQL migrations + routing-config |
mysql-local | MySQL | API + MySQL + Redis + Kafka + ClickHouse + MySQL migrations + routing-config |
| Profile | DB | Includes |
|---|---|---|
dashboard-postgres-ghcr | PostgreSQL | core PG stack + dashboard + Mintlify docs |
dashboard-postgres-local | PostgreSQL | core PG stack + dashboard + Mintlify docs |
dashboard-mysql-ghcr | MySQL | core MySQL stack + dashboard + Mintlify docs |
dashboard-mysql-local | MySQL | core MySQL stack + dashboard + Mintlify docs |
| Profile | Adds |
|---|---|
monitoring | Prometheus + Grafana |
groovy-ghcr | Groovy runner image |
groovy-local | Groovy runner built from local source |
analytics-clickhouse | Kafka topic init + ClickHouse analytics bootstrap only |
For local source-run development with the full PostgreSQL analytics stack:
./oneclick.sh
For the full end-to-end regression gate owned by the Cypress branch:
npm run test:e2e
That command runs:
oneclick.shdashboard-postgres-localMode-specific entrypoints:
npm run test:e2e:source
npm run test:e2e:docker
This flow:
cargo run --no-default-features --features postgreshttp://localhost:5173/By default, Ctrl+C stops the local API/dashboard processes and any infra services that oneclick.sh
started itself. To keep infra running after exit:
ONECLICK_KEEP_INFRA=1 ./oneclick.sh
docker compose --profile postgres-ghcr up -d
docker compose --profile dashboard-postgres-ghcr up -d
docker compose --profile postgres-ghcr --profile monitoring up -d
Common wrappers:
make init-pg-ghcr
make init-pg-local
make init-mysql-ghcr
make init-mysql-local
make run-pg-ghcr
make run-mysql-local
make reset-analytics-clickhouse
make stop
The Kafka to ClickHouse analytics path is bootstrapped automatically.
kafka-initclickhouse/scripts/ on first bootclickhouse-dataIf you need a clean analytics rebuild, use:
make reset-analytics-clickhouse
That removes the ClickHouse analytics volume and recreates the Kafka + ClickHouse analytics stack.
cargo build --release --no-default-features --features middleware,kms-aws,postgres
just migrate-pg
RUSTFLAGS="-Awarnings" cargo run --no-default-features --features postgres
cargo build --release --features release
RUSTFLAGS="-Awarnings" cargo run --features release
docker build --platform=linux/amd64 -t decision-engine-mysql:local -f Dockerfile .
docker build --platform=linux/amd64 -t decision-engine-pg:local -f Dockerfile.postgres .
Example container run:
docker run --platform=linux/amd64 \
-v $(pwd)/config/docker-configuration.toml:/local/config/development.toml \
-p 8080:8080 \
decision-engine-pg:local
Chart location: helm-charts/
cd helm-charts
helm dependency update
helm install my-release .
Use helm dependency update, not helm dependency build — the committed Chart.lock digest can drift out of sync with Chart.yaml, and build fails hard on any mismatch (Error: the lock file (Chart.lock) is out of sync with the dependencies file). update re-resolves and re-fetches the postgresql, mysql, and redis subcharts from the Bitnami repo unconditionally.
For image overrides, use image.repository, image.version, and image.pullPolicy. Verify with helm install --dry-run or helm template before applying to a cluster.
curl http://localhost:8080/health
Expected response:
{"message":"Health is good"}
Dashboard profiles also expose:
http://localhost:8081/dashboard/http://localhost:8081/introductionhttp://localhost:8081/api-refs/api-refMonitoring profile also exposes:
http://localhost:9090http://localhost:3000docker compose --profile postgres-ghcr down -v
docker compose --profile postgres-ghcr up -d
docker compose logs db-migrator-postgres
docker compose logs db-migrator
docker compose logs kafka-init
docker compose logs clickhouse
Check the ClickHouse schema directly:
curl --user decision_engine:decision_engine \
"http://localhost:8123/?query=SHOW%20TABLES%20FROM%20default"
docker-compose.yamlconfig/docker-configuration.tomlsrc/config.rssrc/app.rs