Skip to content

DashboardDocker

Brian Lehnen edited this page Apr 9, 2026 · 2 revisions

Dashboard Docker Deployment

The DotNetWorkQueue Dashboard is available as a pre-built Docker image that runs the API and Blazor Server UI in a single self-contained process. No separate API deployment is needed.


Docker Image

Property Value
Image blehnen74/dotnetworkqueue-dashboard
Base mcr.microsoft.com/dotnet/aspnet:10.0
Port 8080 (HTTP)

Quick start:

docker run -p 8080:8080 blehnen74/dotnetworkqueue-dashboard

Then open http://localhost:8080 in your browser.


Self-Contained Mode

The Docker image runs DotNetWorkQueue.Dashboard.Ui.dll, which hosts both the REST API endpoints and the Blazor Server UI inside a single ASP.NET Core process. You do not need to deploy the API separately when using the Docker image.

The in-process API is automatically registered as a "Local" source. The UI resolves the actual listen address at startup via IServer, so you do not need to add a DashboardApi:Sources entry for the local API. To customize the display name, set DashboardApi:LocalSourceName in your config (defaults to "Local").

You can add additional remote sources alongside the auto-registered local source. See Multi-Source below.

The port is configured via the ASPNETCORE_URLS environment variable, which defaults to http://+:8080 in the image.


Configuration with appsettings.json

The dashboard reads configuration from a Dashboard section in your appsettings.json. The IConfiguration overload AddDotNetWorkQueueDashboard(IServiceCollection, IConfiguration) binds this section automatically.

Example appsettings.json:

{
  "Dashboard": {
    "EnableSwagger": true,
    "ApiKey": "",
    "AssemblyPaths": ["/app/plugins"],
    "Connections": [
      {
        "Transport": "SqlServer",
        "ConnectionString": "Server=myserver;Database=mydb;User Id=sa;Password=secret;",
        "DisplayName": "Production SQL",
        "Queues": ["orders", "notifications"]
      }
    ]
  }
}

DashboardConnectionConfig Properties

Property Type Description
Transport string Transport name. Valid values: SqlServer, PostgreSql, SQLite, LiteDb, Redis
ConnectionString string Connection string for the transport
DisplayName string Optional label shown in the UI (defaults to transport name)
Queues string[] Queue names to display

Top-Level Dashboard Properties

Property Type Default Description
EnableSwagger bool true Enables the Swagger UI at /swagger
ApiKey string "" If set, all API requests require X-Api-Key: <value> header
AssemblyPaths string[] [] Paths scanned for plugin assemblies at startup

Mount a custom config file:

docker run \
  -v ./appsettings.json:/app/appsettings.json \
  -p 8080:8080 \
  blehnen74/dotnetworkqueue-dashboard

Plugin Assemblies (/app/plugins)

The dashboard deserializes message bodies for display in the UI. To show the actual content of your messages, it needs the POCO type assemblies your producers used to create them.

The official Docker image creates /app/plugins by default. Assemblies placed there are loaded via Assembly.LoadFrom() at startup, allowing the dashboard to deserialize any types they define.

Volume mount (for local DLLs):

docker run \
  -v ./my-types:/app/plugins \
  -p 8080:8080 \
  blehnen74/dotnetworkqueue-dashboard

Alternative -- extend the image:

FROM blehnen74/dotnetworkqueue-dashboard
COPY ./publish/MyApp.Contracts.dll /app/plugins/

DashboardOptions.AssemblyPaths (or Dashboard:AssemblyPaths in JSON) controls which directories are scanned. The /app/plugins default is set in the base image.


Multi-Source in Docker

The auto-registered "Local" source covers the in-process API. To also monitor remote Dashboard API instances, add them to DashboardApi:Sources in your appsettings.json:

{
  "Dashboard": {
    "EnableSwagger": true,
    "Connections": [ ... ]
  },
  "DashboardApi": {
    "Sources": [
      {
        "Name": "Remote Production",
        "BaseUrl": "https://dashboard-api.prod.example.com",
        "ApiKey": "prod-key"
      }
    ]
  }
}

The local source is added automatically and does not need to appear in the Sources array. The home page shows both "Local" and any configured remote sources in collapsible panels with health status.

See Dashboard UI — Multi-Source for URL routing and health monitoring details.


Security Notes

Note: The container serves HTTP on port 8080. Production deployments should place the container behind a reverse proxy (nginx, Traefik, Caddy, etc.) that terminates HTTPS.


SQLite Native Library

The official Docker image includes libsqlite3-0 and a libdl.so symlink required for System.Data.SQLite.Core compatibility on Linux. This is handled automatically; no user action is needed unless you are building a custom image, in which case you should add these packages in your Dockerfile:

RUN apt-get update && apt-get install -y libsqlite3-0 && \
    ln -s /usr/lib/x86_64-linux-gnu/libdl.so.2 /usr/lib/x86_64-linux-gnu/libdl.so

Clone this wiki locally