The BWS applications, the gRPC services as well as the Portal, need to get some configuration at startup. Some configuration settings are required (like the MongoDB:ConnectionString), others have reasonable default values and can be adapted as needed.
Secrets like encryption-keys, passwords and connection strings shall not be kept in configuration files. If Docker Swarm, Kubernetes or an other orchestration tool is used, the secret management of these tools can be used.
The BWS applications use the Kestrel web server to host the services. Therefore, the Kestrel endpoint configuration options can be applied to the BWS services as well. For example, to configure TLS you can use a settings file like
{
  "Kestrel": {
    "Endpoints": {
      "Https": {
        "Url": "https://+:5001",
        "Certificate": {
          "Path": "<path to .pfx file>",
          "Password": "<certificate password>"
        }
      }
    }
  }
}environment:
  ASPNETCORE_URLS: https://+:5001
  ASPNETCORE_Kestrel__Certificates__Default__Path: <path to .pfx file>
  ASPNETCORE_Kestrel__Certificates__Default__Password: <certificate password>env:
  - name: Kestrel__Endpoints__gRPC__Protocols
    value: Http2
  - name: Kestrel__Endpoints__gRPC__Url
    value: http://*:50051
  - name: Kestrel__Endpoints__RESTful__Protocols
    value: Http1
  - name: Kestrel__Endpoints__RESTful__Url
    value: http://*:8080Also, all BWS applications use Serilog for structured logging. Therefore, logging can be configured using Serilog settings. Beside of the standard Serilog sinks Console and File, you can add sinks e.g. like Seq and OpenSearch.
{
  "Serilog": {
    "MinimumLevel": "Warning",
    "WriteTo": [
      {
        "Name": "Console"
      },
      {
        "Name": "Seq",
        "Args": {
          "serverUrl": "<URL of SEQ server>"
        }
      }
    ]
  }
}environment:
  Serilog__MinimumLevel: "Warning"
  Serilog__WriteTo__0__Name: "Console"
  Serilog__WriteTo__1__Name: "Seq"
  Serilog__WriteTo__1__Args__serverUrl: "<URL of SEQ server>"env:
  - name: Serilog__MinimumLevel
    value: Warning
  - name: Serilog__WriteTo__0__Name
    value: Console
  - name: Serilog__WriteTo__1__Name
    value: Seq
  - name: Serilog__WriteTo__1__Args__serverUrl
    value: <URL of SEQ server>/mnt/bwslogging. The files in this folder have a default retention of
                    30 days and are automatically deleted after this retention period.
                /mnt/templates.
                /mnt/bwslogging.
                /mnt/templates.
                /mnt/bwslogging.