Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration Reference

Complete configuration options for Reframe.

Configuration Sources

Configuration is loaded in priority order:

  1. Environment variables (highest)
  2. Configuration file (reframe.config.json)
  3. Built-in defaults (lowest)

Environment Variables

VariableDefaultDescription
REFRAME_HOST0.0.0.0Server bind address
REFRAME_PORT3000Server port
REFRAME_PACKAGE_PATH/packagesPackage directory
TOKIO_WORKER_THREADSCPU coresAsync worker threads
RUST_LOGinfoLog level
RUST_LOG_FORMATcompactLog format (compact/json/pretty)
MONGODB_URI-MongoDB connection string
MONGODB_DATABASEreframeDatabase name

Configuration File

Create reframe.config.json in the working directory:

{
  "server": {
    "host": "0.0.0.0",
    "port": 3000,
    "workers": 4
  },

  "logging": {
    "level": "info",
    "format": "compact",
    "file": null
  },

  "packages": [
    {
      "path": "/packages/swift-cbpr",
      "enabled": true
    }
  ],

  "database": {
    "mongodb_uri": "mongodb://localhost:27017",
    "database_name": "reframe",
    "store_messages": false
  },

  "api_docs": {
    "enabled": true,
    "title": "Reframe API",
    "version": "3.1.8"
  }
}

Section Details

Server

{
  "server": {
    "host": "0.0.0.0",
    "port": 3000,
    "workers": 4
  }
}
OptionTypeDefaultDescription
hoststring0.0.0.0Bind address
portnumber3000Listen port
workersnumberCPU coresTokio worker threads

Logging

{
  "logging": {
    "level": "info",
    "format": "compact",
    "file": {
      "path": "/var/log/reframe/reframe.log",
      "rotation": "daily",
      "max_files": 7
    }
  }
}
OptionTypeDefaultDescription
levelstringinfoLog level (trace/debug/info/warn/error)
formatstringcompactOutput format (compact/json/pretty)
file.pathstringnullLog file path
file.rotationstringdailyRotation (daily/hourly/never)
file.max_filesnumber7Files to keep

Packages

{
  "packages": [
    {
      "path": "/packages/swift-cbpr",
      "enabled": true
    },
    {
      "path": "/packages/custom",
      "enabled": false
    }
  ]
}
OptionTypeDescription
pathstringPath to package directory
enabledbooleanWhether to load this package

Database

{
  "database": {
    "mongodb_uri": "mongodb://localhost:27017",
    "database_name": "reframe",
    "store_messages": true,
    "ttl_days": 90
  }
}
OptionTypeDefaultDescription
mongodb_uristring-MongoDB connection URI
database_namestringreframeDatabase name
store_messagesbooleanfalseStore transformed messages
ttl_daysnumber90Message retention days

API Documentation

{
  "api_docs": {
    "enabled": true,
    "title": "Reframe API",
    "version": "3.1.8",
    "description": "ISO 20022 Transformation Engine",
    "contact": {
      "name": "Support",
      "email": "support@example.com"
    }
  }
}

Complete Example

{
  "server": {
    "host": "0.0.0.0",
    "port": 3000,
    "workers": 8
  },

  "logging": {
    "level": "info",
    "format": "json",
    "file": {
      "path": "/var/log/reframe/reframe.log",
      "rotation": "daily",
      "max_files": 30
    }
  },

  "packages": [
    {
      "path": "/packages/swift-cbpr",
      "enabled": true
    }
  ],

  "database": {
    "mongodb_uri": "mongodb://mongo:27017",
    "database_name": "reframe_prod",
    "store_messages": true,
    "ttl_days": 365
  },

  "api_docs": {
    "enabled": true,
    "title": "Reframe Production API",
    "version": "3.1.8"
  }
}

Docker Configuration

Environment Variables

docker run \
  -e REFRAME_PORT=8080 \
  -e RUST_LOG=debug \
  -e TOKIO_WORKER_THREADS=8 \
  plasmatic/reframe:latest

Configuration File Mount

docker run \
  -v /path/to/reframe.config.json:/app/reframe.config.json \
  plasmatic/reframe:latest

Kubernetes Configuration

ConfigMap

apiVersion: v1
kind: ConfigMap
metadata:
  name: reframe-config
data:
  reframe.config.json: |
    {
      "server": {
        "port": 3000
      },
      "logging": {
        "level": "info",
        "format": "json"
      }
    }

Secret (for sensitive values)

apiVersion: v1
kind: Secret
metadata:
  name: reframe-secrets
type: Opaque
stringData:
  MONGODB_URI: "mongodb://user:pass@host:27017"

Validation

Reframe validates configuration on startup:

2025-01-15T10:30:00Z INFO reframe: Loading configuration
2025-01-15T10:30:00Z INFO reframe: Server: 0.0.0.0:3000
2025-01-15T10:30:00Z INFO reframe: Workers: 8
2025-01-15T10:30:00Z INFO reframe: Log level: info
2025-01-15T10:30:00Z INFO reframe: Package: /packages/swift-cbpr (enabled)

Invalid configuration causes startup failure with clear error messages.


Kubernetes Deployment →