Skip to content

Configuration

Chris Mavrommatis edited this page Mar 19, 2025 · 32 revisions

Binacle.Net is designed for flexibility, with many optional features that can be activated as needed. Most features reside within modules, which may have compatibility limitations depending on your stack, technologies, or databases.

📖 Table of Contents

📂 Configuration Files

Configuration files are located in Config_Files (or /app/Config_Files in a containerized environment).

📑 Directory Structure

app
└── Config_Files
    ├── Features.json
    ├── Presets.json
    ├── DiagnosticsModule
    │   ├── HealthChecks.json
    │   ├── OpenTelemetry.json
    │   ├── PackingLogs.json
    │   ├── Serilog.json
    ├── ServiceModule
    │   ├── ConnectionStrings.json
    │   ├── JwtAuth.json
    │   ├── RateLimiter.json
    │   └── Users.json
    └── UiModule
        └── ConnectionStrings.json

⚙️ Overriding Configuration

Configuration can be changed using:

  • Direct file edits (or bind mounts) – not recommended for production.
  • Production overrides (<filename>.Production.json) – Override specific settings without modifying the original file.
  • Environment variables – Take precedence over configuration files.

📝 Using Production Overrides (<filename>.Production.json)

Instead of modifying the following example file Settings.json:

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

Create Settings.Production.json with only the necessary changes and place it at the same directory as Settings.json:

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

🌍 Using Environment Variables

You can override any setting using environment variables, replacing nested properties with double underscores (__):

Settings__Enabled=True
Settings__Logs__Retention=5

🔧 Configuration Sections

This section covers how to configure Binacle.Net based on its modular structure.

1️⃣ Core

Provides the foundation of Binacle.Net, which includes the base API functionality, Swagger UI, and presets.

2️⃣ Diagnostics Module

Handles logging, health checks, and telemetry. This module is always enabled.

3️⃣ Service Module

Runs Binacle.Net as a managed service, adding authentication and rate limiting.

4️⃣ UI Module

Adds a Blazor UI for a packing demo and protocol decoder.

Clone this wiki locally