Skip to content

Commit f0a11a5

Browse files
CopilotIEvangelistJamesNKCopilot
authored
Document aspire dashboard run as primary standalone configuration path (#1157)
* Initial plan * Document aspire dashboard run in dashboard docs Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com> Co-authored-by: James Newton-King <james@newtonking.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent d5d1d24 commit f0a11a5

2 files changed

Lines changed: 47 additions & 26 deletions

File tree

src/frontend/src/content/docs/dashboard/configuration.mdx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,32 @@ There are many ways to provide configuration:
5858
- Environment variables. The `:` delimiter should be replaced with double underscore (`__`) in environment variable names.
5959
- Optional JSON configuration file. The `ASPIRE_DASHBOARD_CONFIG_FILE_PATH` setting can be used to specify a JSON configuration file.
6060

61-
Consider the following example, which shows how to configure the dashboard when started from a Docker container:
61+
When running the dashboard with the Aspire CLI, pass dashboard configuration as additional arguments:
62+
63+
<OsAwareTabs syncKey="terminal">
64+
<div slot="unix">
65+
66+
```bash title="Aspire CLI"
67+
aspire dashboard run \
68+
--Dashboard:TelemetryLimits:MaxLogCount=1000 \
69+
--Dashboard:TelemetryLimits:MaxTraceCount=1000 \
70+
--Dashboard:TelemetryLimits:MaxMetricsCount=1000
71+
```
72+
73+
</div>
74+
<div slot="windows">
75+
76+
```powershell title="Aspire CLI"
77+
aspire dashboard run `
78+
--Dashboard:TelemetryLimits:MaxLogCount=1000 `
79+
--Dashboard:TelemetryLimits:MaxTraceCount=1000 `
80+
--Dashboard:TelemetryLimits:MaxMetricsCount=1000
81+
```
82+
83+
</div>
84+
</OsAwareTabs>
85+
86+
If you're running the standalone dashboard as a container image, configure the same values with environment variables:
6287

6388
<OsAwareTabs syncKey="terminal">
6489
<div slot="unix">

src/frontend/src/content/docs/dashboard/security-considerations.mdx

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ There are scenarios where you might want to allow an unsecured transport. The da
3131

3232
### Standalone mode
3333

34-
The dashboard is shipped as a Docker image and can be used without the rest of Aspire. When the dashboard is launched in standalone mode, it defaults to a mix of secure and unsecured settings.
34+
The dashboard can run in standalone mode using `aspire dashboard run` or as a container image. When launched in standalone mode, it defaults to a mix of secure and unsecured settings.
3535

3636
- Browser frontend authenticated with a browser token.
3737
- Incoming telemetry is unsecured. Warnings are displayed in the console and dashboard UI.
@@ -57,29 +57,27 @@ API key authentication can be enabled on the telemetry endpoint with some additi
5757
<OsAwareTabs syncKey="terminal">
5858
<div slot="unix">
5959

60-
```bash
61-
docker run --rm -it -d -p 18888:18888 -p 4317:18889 -p 4318:18890 --name aspire-dashboard \
62-
-e DASHBOARD__OTLP__AUTHMODE='ApiKey' \
63-
-e DASHBOARD__OTLP__PRIMARYAPIKEY='{MY_APIKEY}' \
64-
mcr.microsoft.com/dotnet/aspire-dashboard:latest
60+
```bash title="Aspire CLI"
61+
aspire dashboard run \
62+
--Dashboard:Otlp:AuthMode=ApiKey \
63+
--Dashboard:Otlp:PrimaryApiKey='{MY_APIKEY}'
6564
```
6665

6766
</div>
6867
<div slot="windows">
6968

70-
```powershell
71-
docker run --rm -it -d -p 18888:18888 -p 4317:18889 -p 4318:18890 --name aspire-dashboard `
72-
-e DASHBOARD__OTLP__AUTHMODE='ApiKey' `
73-
-e DASHBOARD__OTLP__PRIMARYAPIKEY='{MY_APIKEY}' `
74-
mcr.microsoft.com/dotnet/aspire-dashboard:latest
69+
```powershell title="Aspire CLI"
70+
aspire dashboard run `
71+
--Dashboard:Otlp:AuthMode=ApiKey `
72+
--Dashboard:Otlp:PrimaryApiKey='{MY_APIKEY}'
7573
```
7674

7775
</div>
7876
</OsAwareTabs>
7977

80-
The preceding Docker command:
78+
The preceding command:
8179

82-
- Starts the Aspire dashboard image and exposes OTLP endpoints as port `4317` (gRPC) and port `4318` (HTTP)
80+
- Starts the dashboard with OTLP endpoints on port `4317` (gRPC) and port `4318` (HTTP)
8381
- Configures the OTLP endpoint to use `ApiKey` authentication. This requires that incoming telemetry has a valid `x-otlp-api-key` header value.
8482
- Configures the expected API key. `{MY_APIKEY}` in the example value should be replaced with a real API key. The API key can be any text, but a value with at least 128 bits of entropy is recommended.
8583

@@ -154,23 +152,21 @@ When enabled, the telemetry API is served on the same endpoint as the dashboard
154152
<OsAwareTabs syncKey="terminal">
155153
<div slot="unix">
156154

157-
```bash
158-
docker run --rm -it -d -p 18888:18888 -p 4317:18889 -p 4318:18890 --name aspire-dashboard \
159-
-e DASHBOARD__API__ENABLED='true' \
160-
-e DASHBOARD__API__AUTHMODE='ApiKey' \
161-
-e DASHBOARD__API__PRIMARYAPIKEY='{MY_APIKEY}' \
162-
mcr.microsoft.com/dotnet/aspire-dashboard:latest
155+
```bash title="Aspire CLI"
156+
aspire dashboard run \
157+
--Dashboard:Api:Enabled=true \
158+
--Dashboard:Api:AuthMode=ApiKey \
159+
--Dashboard:Api:PrimaryApiKey='{MY_APIKEY}'
163160
```
164161

165162
</div>
166163
<div slot="windows">
167164

168-
```powershell
169-
docker run --rm -it -d -p 18888:18888 -p 4317:18889 -p 4318:18890 --name aspire-dashboard `
170-
-e DASHBOARD__API__ENABLED='true' `
171-
-e DASHBOARD__API__AUTHMODE='ApiKey' `
172-
-e DASHBOARD__API__PRIMARYAPIKEY='{MY_APIKEY}' `
173-
mcr.microsoft.com/dotnet/aspire-dashboard:latest
165+
```powershell title="Aspire CLI"
166+
aspire dashboard run `
167+
--Dashboard:Api:Enabled=true `
168+
--Dashboard:Api:AuthMode=ApiKey `
169+
--Dashboard:Api:PrimaryApiKey='{MY_APIKEY}'
174170
```
175171

176172
</div>

0 commit comments

Comments
 (0)