Configuration
causet-runtime is configured entirely via environment variables. There is no configuration file.
PostgreSQL (causet DB)
| Variable | Description | Example |
|---|---|---|
CAUSET_DB_URL | R2DBC connection URL for the causet event store | r2dbc:postgresql://localhost:5432/causet |
CAUSET_DB_USERNAME | Database username | causet_user |
CAUSET_DB_PASSWORD | Database password | changeme |
CAUSET_DB_POOL_MAX | Maximum R2DBC connection pool size | 20 |
CAUSET_DB_POOL_MIN | Minimum R2DBC connection pool size | 5 |
Note:
causet-runtimeuses R2DBC exclusively. There is no JDBC driver. JDBC-style JDBC URLs will not work.
Kafka / Redpanda
| Variable | Description | Example |
|---|---|---|
KAFKA_BOOTSTRAP_SERVERS | Comma-separated broker addresses | localhost:9092 |
KAFKA_PROJECTION_EVENTS_TOPIC | Topic for projection event fan-out | causet.projection-events.v1 |
KAFKA_LEDGER_EVENTS_TOPIC | Topic for raw ledger event stream | causet.ledger-events.v1 |
KAFKA_PRODUCER_ACKS | Producer acknowledgement level | all (recommended for durability) |
KAFKA_PRODUCER_RETRIES | Number of producer retries on failure | 3 |
KAFKA_SECURITY_PROTOCOL | Security protocol | PLAINTEXT (dev) or SASL_SSL (prod) |
KAFKA_SASL_USERNAME | SASL username (if SASL_SSL) | runtime-producer |
KAFKA_SASL_PASSWORD | SASL password (if SASL_SSL) | ... |
S3 / MinIO (IR Artifacts)
| Variable | Description | Example (local) | Example (prod) |
|---|---|---|---|
S3_ENDPOINT | S3-compatible endpoint URL | http://localhost:9000 | (use AWS default) |
S3_BUCKET | Bucket containing IR artifacts | causet-artifacts | causet-artifacts-prod |
S3_REGION | AWS region | us-east-1 | us-east-1 |
S3_ACCESS_KEY_ID | Access key ID | minioadmin | (IAM role preferred) |
S3_SECRET_ACCESS_KEY | Secret access key | minioadmin | (IAM role preferred) |
S3_PATH_STYLE_ACCESS | Force path-style URL (required for MinIO) | true | false |
For production on AWS, prefer IAM roles over static credentials. Set S3_ENDPOINT only when overriding the default AWS endpoint (e.g. for MinIO or localstack).
causet-saas-cloud (Active Release Resolution)
| Variable | Description | Example |
|---|---|---|
SAAS_CLOUD_URL | Base URL of causet-saas-cloud | http://causet-saas-cloud:8085 |
SAAS_CLOUD_API_KEY | Service-to-service API key | ... |
IR_CACHE_TTL_SECONDS | How long to cache the active IR version | 30 |
Redis (IR Artifact Cache)
| Variable | Description | Example |
|---|---|---|
REDIS_URL | Redis connection URL | redis://localhost:6379 |
REDIS_IR_CACHE_TTL_SECONDS | TTL for cached IR artifacts in Redis | 300 |
Port Configuration
| Variable | Description | Default |
|---|---|---|
SERVER_PORT | HTTP server port | 8080 |
GRPC_PORT | gRPC server port | 9090 |
Logging
| Variable | Description | Example |
|---|---|---|
LOG_LEVEL | Root log level | INFO |
LOG_LEVEL_RULES | Log level for rules evaluation | DEBUG (dev), INFO (prod) |
LOG_FORMAT | Log output format | json (prod), console (dev) |
Structured JSON logging (LOG_FORMAT=json) is recommended for production — it integrates with log aggregation systems like Datadog, CloudWatch, and Loki.
Health Check
| Variable | Description | Default |
|---|---|---|
MANAGEMENT_SERVER_PORT | Port for actuator/health endpoint | same as SERVER_PORT |
HEALTH_READINESS_CHECK_DB | Include DB in readiness check | true |
HEALTH_READINESS_CHECK_KAFKA | Include Kafka in readiness check | true |
Local vs Production Differences
| Concern | Local | Production |
|---|---|---|
| PostgreSQL | Local Docker container | AWS RDS (PostgreSQL) |
| Kafka | Local Redpanda | AWS MSK or Confluent Cloud |
| S3 | MinIO (S3_PATH_STYLE_ACCESS=true) | AWS S3 (IAM role auth) |
| causet-saas-cloud | Local Docker container | ECS / Kubernetes service |
| Secrets | Plaintext env vars in .env | AWS Secrets Manager / Parameter Store |
| Log format | console | json |
Full Production Reference
For the complete environment variable reference for ECS deployments, see the ecs-env-vars-reference document in the internal operations repository. It includes variables for all services (runtime, projection-worker, query-service, ws-gateway) with recommended values for production.
Related Pages
- Runtime Overview — what the runtime is and does
- Storage — database details
- Message Brokers — Kafka configuration