Configuration is loaded from appsettings.json, overridden by appsettings.{Environment}.json, then by appsettings.local.json (not committed), and finally by environment variables.

Environment variables use __ as the section separator: RabbitMq__Uri=amqp://....

Full example

  {
  "Logging": {
    "LogLevel": {
      "Default": "Information"
    }
  },
  "ConnectionStrings": {
    "Postgres": "Host=localhost;Port=26257;Database=photostand;Username=root;SSL Mode=Disable"
  },
  "RabbitMq": {
    "Uri": "amqp://guest:guest@localhost:5672"
  },
  "MinIO": {
    "Endpoint": "localhost:9000",
    "AccessKey": "minioadmin",
    "SecretKey": "minioadmin",
    "UseSSL": false,
    "Bucket": "photostand"
  },
  "Watchdog": {
    "IntervalMinutes": 5,
    "StaleThresholdMinutes": 5,
    "MaxRetries": 3
  }
}
  

Reference

ConnectionStrings

KeyTypeDefaultDescription
PostgresstringrequiredPostgreSQL / CockroachDB connection string

RabbitMq

KeyTypeDefaultDescription
UristringrequiredRabbitMQ connection URI (e.g. amqp://guest:guest@localhost:5672)

MinIO

KeyTypeDefaultDescription
EndpointstringrequiredMinIO endpoint, without scheme (e.g. localhost:9000)
AccessKeystringrequiredMinIO access key
SecretKeystringrequiredMinIO secret key
UseSSLboolfalseWhether to connect over HTTPS
BucketstringrequiredBucket that holds the photos

Watchdog

KeyTypeDefaultDescription
IntervalMinutesint5How often the watchdog runs (in minutes)
StaleThresholdMinutesint5A job in printing state for longer than this is considered stuck
MaxRetriesint3Number of requeue attempts before a stuck job is marked as error

Logging

KeyValuesDefaultDescription
LogLevel.DefaultDebug, Information, Warning, ErrorInformationMinimum log level