Unified Gateway

Local

Run Unified Gateway on your machine for development.

For development, run Postgres and Redis in Docker and the gateway on the host with hot reload.

Dependencies

git clone https://github.com/boelabs/unified-gateway.git && cd unified-gateway
bun install
docker compose -f docker-compose.yml -f compose.local.yaml up -d postgres redis

This starts only Postgres and Redis locally (plaintext on localhost), which the gateway reaches without TLS — so there is no Bun TLS issue.

Configure and run

Create apps/gateway/.env (see Setup) with the local connection strings:

DATABASE_URL=postgres://gateway:gateway@localhost:5432/unifiedgateway
REDIS_URL=redis://localhost:6379

Apply migrations and start it on Bun with hot reload:

bun run --filter @boelabs/unified-gateway db:migrate
bun run --filter @boelabs/unified-gateway dev
curl http://localhost:4000/health/ready

dev runs the gateway on Bun with --watch (restart on change). Next, the Quickstart registers a provider and makes your first call.

Full stack locally

To run everything (gateway + docs + dependencies) in containers instead of on the host:

docker compose -f docker-compose.yml -f compose.local.yaml up -d

The override binds Postgres, Redis, the gateway, and docs to 127.0.0.1; it is intentionally not loaded by production PaaS deployments.

See Deployment → The Compose stack.

On this page