Configuration

causet-runtime is configured entirely via environment variables. There is no configuration file.


PostgreSQL (causet DB)

VariableDescriptionExample
CAUSET_DB_URLR2DBC connection URL for the causet event storer2dbc:postgresql://localhost:5432/causet
CAUSET_DB_USERNAMEDatabase usernamecauset_user
CAUSET_DB_PASSWORDDatabase passwordchangeme
CAUSET_DB_POOL_MAXMaximum R2DBC connection pool size20
CAUSET_DB_POOL_MINMinimum R2DBC connection pool size5

Note: causet-runtime uses R2DBC exclusively. There is no JDBC driver. JDBC-style JDBC URLs will not work.


Kafka / Redpanda

VariableDescriptionExample
KAFKA_BOOTSTRAP_SERVERSComma-separated broker addresseslocalhost:9092
KAFKA_PROJECTION_EVENTS_TOPICTopic for projection event fan-outcauset.projection-events.v1
KAFKA_LEDGER_EVENTS_TOPICTopic for raw ledger event streamcauset.ledger-events.v1
KAFKA_PRODUCER_ACKSProducer acknowledgement levelall (recommended for durability)
KAFKA_PRODUCER_RETRIESNumber of producer retries on failure3
KAFKA_SECURITY_PROTOCOLSecurity protocolPLAINTEXT (dev) or SASL_SSL (prod)
KAFKA_SASL_USERNAMESASL username (if SASL_SSL)runtime-producer
KAFKA_SASL_PASSWORDSASL password (if SASL_SSL)...

S3 / MinIO (IR Artifacts)

VariableDescriptionExample (local)Example (prod)
S3_ENDPOINTS3-compatible endpoint URLhttp://localhost:9000(use AWS default)
S3_BUCKETBucket containing IR artifactscauset-artifactscauset-artifacts-prod
S3_REGIONAWS regionus-east-1us-east-1
S3_ACCESS_KEY_IDAccess key IDminioadmin(IAM role preferred)
S3_SECRET_ACCESS_KEYSecret access keyminioadmin(IAM role preferred)
S3_PATH_STYLE_ACCESSForce path-style URL (required for MinIO)truefalse

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)

VariableDescriptionExample
SAAS_CLOUD_URLBase URL of causet-saas-cloudhttp://causet-saas-cloud:8085
SAAS_CLOUD_API_KEYService-to-service API key...
IR_CACHE_TTL_SECONDSHow long to cache the active IR version30

Redis (IR Artifact Cache)

VariableDescriptionExample
REDIS_URLRedis connection URLredis://localhost:6379
REDIS_IR_CACHE_TTL_SECONDSTTL for cached IR artifacts in Redis300

Port Configuration

VariableDescriptionDefault
SERVER_PORTHTTP server port8080
GRPC_PORTgRPC server port9090

Logging

VariableDescriptionExample
LOG_LEVELRoot log levelINFO
LOG_LEVEL_RULESLog level for rules evaluationDEBUG (dev), INFO (prod)
LOG_FORMATLog output formatjson (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

VariableDescriptionDefault
MANAGEMENT_SERVER_PORTPort for actuator/health endpointsame as SERVER_PORT
HEALTH_READINESS_CHECK_DBInclude DB in readiness checktrue
HEALTH_READINESS_CHECK_KAFKAInclude Kafka in readiness checktrue

Local vs Production Differences

ConcernLocalProduction
PostgreSQLLocal Docker containerAWS RDS (PostgreSQL)
KafkaLocal RedpandaAWS MSK or Confluent Cloud
S3MinIO (S3_PATH_STYLE_ACCESS=true)AWS S3 (IAM role auth)
causet-saas-cloudLocal Docker containerECS / Kubernetes service
SecretsPlaintext env vars in .envAWS Secrets Manager / Parameter Store
Log formatconsolejson

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.