File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed
Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -517,6 +517,32 @@ dotnet run
517517
518518---
519519
520+ # Environment Variables for Environment
521+
522+ - ` ASPNETCORE_ENVIRONMENT ` (ASP.NET Core) — choose ` Development ` /` Staging ` /` Production ` per slot to drive ` IWebHostEnvironment ` .
523+ - ` DOTNET_ENVIRONMENT ` (generic hosts, workers) — keep identical to ` ASPNETCORE_ENVIRONMENT ` so overrides stay predictable.
524+ - ` ASPNETCORE_ENVIRONMENT ` via App Settings (Azure App Service) — one App Setting change flips every instance.
525+ - ` DOTNET_ENVIRONMENT ` in containers (Docker/K8s) — bake into manifests so host + container diagnostics align.
526+
527+ ---
528+
529+ # Ports & URL Bindings
530+
531+ - ` ASPNETCORE_URLS ` (any host) — specify full scheme + IP; separate multiples with ` ; ` .
532+ - ` HTTP_PORTS ` / ` HTTPS_PORTS ` (.NET 8 containers) — shorthand feeding ` ASPNETCORE_URLS ` ; defaults 8080/8443.
533+ - ` WEBSITES_PORT ` (Azure App Service custom containers) — set via App Settings so routing targets the right port.
534+ - ` Kestrel__Endpoints__Http__Url ` (fine-grained Kestrel) — use ` __ ` hierarchy for per-endpoint bindings and cert wiring.
535+
536+ ---
537+
538+ # Diagnostics, GC & Container Flags
539+
540+ - ` DOTNET_EnableDiagnostics ` — set to ` 0 ` to block debugger/profiler attaches; combine with diagnostic ports for exceptions.
541+ - ` DOTNET_DiagnosticPorts ` — define connect/listen/suspend behavior when you still need targeted traces.
542+ - ` DOTNET_RUNNING_IN_CONTAINER ` — makes GC + ThreadPool honor cgroup limits inside containers.
543+
544+ ---
545+
520546# DEMOS
521547
522548---
@@ -1055,7 +1081,7 @@ var apiService = builder.AddProject<Projects.ApiService>("apiservice")
10551081
10561082- [ .NET Configuration Docs] ( https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration )
10571083- [ .NET Aspire Docs] ( https://learn.microsoft.com/en-us/dotnet/aspire/ )
1058-
1084+ - [ .NET Environment Variables ] ( https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables )
10591085</div >
10601086
10611087<div >
You can’t perform that action at this time.
0 commit comments