Docker Compose

The docker-compose.yml at the repository root defines the full stack. Services are organized into profiles so you can run as much or as little as you need.

Profiles

ProfileServicesUse case
(default)DS server, Envoy proxyAuthenticated protocol server
sync+ Postgres, Electric SQL, sync serviceBidirectional PG sync
dev+ Adminer, heartbeat producerDeveloper observability

Starting the stack

Default (server + auth proxy)

docker-compose up -d

This starts the DS server on port 4437 (internal) and Envoy on port 8080 (public). The health check is at http://localhost:8080/healthz.

With sync

docker-compose --profile sync up -d --build

Adds Postgres, Electric SQL, and the sync service. Data flows bidirectionally between DS streams and Postgres.

Full dev stack

make dev

Starts everything: server, Envoy, Postgres, Electric, sync service, Adminer (DB admin UI), and a heartbeat producer. See Dev mode for details.

Building the Docker image

docker-compose build
# or
make docker

The server Dockerfile uses a multi-stage build: compile with rust:latest, run on debian:bookworm-slim.

Stopping

docker-compose down                          # default profile
docker-compose --profile sync down           # sync profile
docker-compose --profile sync --profile dev down  # everything
make dev-down                                 # same as above

Port map

See Port map for all ports and their purposes.

Quick test

# Start the stack
docker-compose up -d

# Health check (no auth)
curl http://localhost:8080/healthz

# Generate a test JWT
cd e2e && npm install
TOKEN=$(node generate-token.mjs)

# Create a stream (authenticated)
curl -X PUT -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: text/plain" \
  http://localhost:8080/v1/stream/test-1

# Append data
curl -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: text/plain" \
  -d "hello" http://localhost:8080/v1/stream/test-1

# Read back
curl -H "Authorization: Bearer $TOKEN" \
  http://localhost:8080/v1/stream/test-1

# Unauthenticated requests are rejected
curl -X PUT http://localhost:8080/v1/stream/test-2  # 401

Integration tests

# Full automated cycle: build, start, test, tear down
make integration-test

# With sync and sessions tests
make integration-test-sessions