You are reading the documentation for v2.1.1, which is not the current version. It describes that release and is kept for reference. It is not updated.Go to v3.1.0 β†’

Configuration

Binacle.Net turns on only what you ask for. Most of it is modules, each with its own files and switches.

This page is the configuration system: where the files are, the ways to override a setting, and which one wins when two disagree. The settings themselves are on the module pages linked at the end.

πŸ“‚ Configuration Files

Every configuration file lives under /app/Config_Files. This is the whole tree in v2.1.1:

app
└── Config_Files
    β”œβ”€β”€ Presets.json
    β”œβ”€β”€ DiagnosticsModule
    β”‚   β”œβ”€β”€ HealthChecks.json
    β”‚   β”œβ”€β”€ OpenTelemetry.json
    β”‚   β”œβ”€β”€ PackingLogs.json
    β”‚   └── Serilog.json
    └── UiModule
        └── ConnectionStrings.json

βš™οΈ Overriding Configuration

There are four ways to change a setting. Which one to use depends on what the setting is:

The examples below use this Settings.json:

{
  "Settings": {
    "Enabled": false,
    "DataFolderPath": "/data",
    "Logs": {
      "FileFormat": "dd-MM-yyyy.txt",
      "Retention": 4
    }
  }
}

🌍 Environment Variables

An environment variable beats every file. Name it after the setting’s path, with __ between the levels:

Settings__Enabled=True
Settings__Logs__Retention=5

πŸ“ Production Overrides

Put a Settings.Production.json next to Settings.json holding only what changes:

{
  "Settings": {
    "Enabled": true,
    "Logs": {
      "Retention": 5
    }
  }
}

The two files are merged, so the rest of Settings.json still applies.

πŸ“„ Direct File Edits

Replace the whole file:

The file you mount replaces every default in it, so a key you leave out is gone, not defaulted. Use this only when you mean to own the whole file - which is the normal way to supply Presets.json.

πŸ”„ Connection String Fallbacks

A connection string can also come from an environment variable named after the connection, uppercased, with _CONNECTION_STRING on the end. This is the place for a connection string that holds credentials.

DATABASE_CONNECTION_STRING=endpoint=https://localhost:1413

βš–οΈ Configuration Precedence

When more than one method sets the same value, the highest row wins:

Order Method Setting (Logs.Retention) Connection string (ConnectionStrings.Database)
1 Environment variable Settings__Logs__Retention=5 ConnectionStrings__Database=endpoint=https://localhost:1413
2 Production override Settings.Production.json ConnectionStrings.Production.json
3 Direct file edit Settings.json ConnectionStrings.json
4 Connection string fallback - DATABASE_CONNECTION_STRING=endpoint=https://localhost:1413

πŸ”§ Modules

Each module adds something to Binacle.Net. Its page lists its files and switches.

πŸ—οΈ Core

The API itself, the presets, and the switches for Swagger UI and Scalar UI.

πŸ“Š Diagnostics Module

Logging, health checks, packing logs and telemetry. Always on; only logging is enabled out of the box.

πŸ›‘οΈ Service Module

Accounts and subscriptions for callers you do not control. Built for the hosted service and not publicly documented from v2.0.0 onward. A breaking change to it does not force a major version.

πŸ–₯️ UI Module

Two browser pages: the packing demo and the ViPaq decoder. Off by default.