Skip to content

Configuration ‐ Service Module ‐ Database

Chris Mavrommatis edited this page Mar 27, 2025 · 2 revisions

The Service Module requires a storage solution to save user data.

📋 Supported Databases

  • Azure Storage (Azure Tables)

🛠️ Configuration

The database is configured via the ConnectionStrings.json file.

Default configuration:

{
  "ConnectionStrings": {
    "AzureStorage": ""
  }
}

Warning

Ensure only one database provider is configured at a time.

🔑 Connection String Fallbacks

Connection String Fallbacks are dedicated environment variables that serve as an additional configuration method for connection strings.

Each fallback follows the format: 🔹 Uppercase connection name + _CONNECTION_STRING

Using Connection String Fallbacks is the recommended way to configure connection strings, ensuring flexibility across environments.

For Azure Storage, the connection string is resolved in the following order of priority:

  • 1️⃣ Environment Variable: ConnectionStrings__AzureStorage
  • 2️⃣ Production Override: ConnectionStrings.Production.json
  • 3️⃣ Configuration File: ConnectionStrings.json (not recomended)
  • 4️⃣ Connection String Fallback: AZURESTORAGE_CONNECTION_STRING

The Service Module will use the highest-priority configuration method it can find.


🏢 Azure Storage (Azure Tables)

To use Azure Storage, create an Azure Storage account if you haven't already. The Service Module specifically interacts with Azure Tables and will automatically create a table named users. If a table with this name already exists, ensure there are no conflicts or use a different storage account.

Note

The Service Module only interacts with the Azure Tables service and does not use other features of the storage account.

A typical Azure Storage connection string looks like this:

DefaultEndpointsProtocol=https;AccountName=your_account_name;AccountKey=your_account_key;TableEndpoint=https://your_account_name.table.core.windows.net/;

Clone this wiki locally