-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration Sources
-
src/BlokeBot/appsettings.jsoncontains non-secret defaults and the configuration shape. -
appsettings.{Environment}.jsonoverlays the base file for the active ASP.NET environment. - Environment variables override file values; nested keys use
__. - Standard ASP.NET command-line configuration remains available when launching the executable directly.
Docker and the NixOS module select Production. The source workflow uses the local ASP.NET environment unless explicitly overridden.
The dashboard can start without Twitch credentials. The bot runtime remains offline until all four identity values are nonblank:
TwitchBot:Identity:BotUsername
TwitchBot:Identity:ClientId
TwitchBot:Identity:ClientSecret
TwitchBot:Identity:RedirectUri
Once activated, BlokeBot validates identity, runtime timing, and retry policy settings during startup. Invalid active configuration prevents startup rather than silently changing the requested values.
- Put ordinary values in environment variables or an external production settings file.
- Put
ClientSecretand any future secrets in a secret manager or protected environment file. - Keep the token cache and database on durable private storage.
blokebot serve --host HOST --port PORT creates an HTTP listener. To serve HTTPS directly from BlokeBot, provide a Kestrel endpoint and certificate through --config; do not pass --host or --port.
{
"Kestrel": {
"Endpoints": {
"Https": {
"Url": "https://localhost:8080",
"Certificate": {
"Path": "/absolute/path/to/blokebot.pfx"
}
}
}
}
}Provide the PFX password through a protected environment variable, then start the server:
export Kestrel__Endpoints__Https__Certificate__Password='private-pfx-password'
blokebot serve --config /absolute/path/to/https.json --data-dir /absolute/path/to/stateThe certificate must be valid for the address that the browser uses. A .NET development certificate is normally for localhost, so use https://localhost:8080, not https://127.0.0.1:8080. Trust the local certificate in the operating system/browser before testing it. For an Internet-facing deployment, use a publicly trusted certificate or terminate TLS at a reverse proxy.