Skip to content
Clean GraphQL API
Lean Mean Clean Apps

Five templates, one brand, one search box. Everything in the docs is in here, including the bits we hoped you'd skim.

Try one of these

Results say which template they came from, so you won't end up reading about Lambda when you wanted GraphQL. Again.

Configuration

Every setting in appsettings.json can be overridden with an environment variable, using __ where the JSON nests.

Variable Default Description
DOTNET_ENVIRONMENT none Layers appsettings.<environment>.json over appsettings.json. The template ships local and docker
ASPNETCORE_HTTP_PORTS 7330 in the container The port to listen on
ASPNETCORE_FORWARDEDHEADERS_ENABLED none Set to true behind a proxy that ends TLS, so HTTPS redirection sees the original scheme
ConnectionStrings__MovieReviews Data Source=movie-reviews.db The SQLite connection string. appsettings.docker.json points it at /app/data/movie-reviews.db
Database__SeedSampleData false When true, seeds sample data into an empty database. On in local and docker
Authentication__Authority empty The OAuth authorization server that issues access tokens. Only in solutions created with --include-auth, where an empty value lets every request through
Authentication__Audience empty The audience access tokens must be issued for, usually the API’s own URL. Only with --include-auth
Serilog__MinimumLevel__Default Information The minimum log level. appsettings.local.json lowers it to Debug, and appsettings.json also overrides Microsoft, Microsoft.AspNetCore and System
Argument Default Description
VERSION_PREFIX 1.0.0.0 The version stamped into the assemblies
VERSION_SUFFIX none A prerelease label added to the version
ENVIRONMENT docker Sets DOTNET_ENVIRONMENT during the build and tests
BASE_IMAGE_REPO, BASE_IMAGE_BUILD, BASE_IMAGE_BUILD_TAG mcr.microsoft.com, dotnet/sdk, 10.0-alpine The SDK image used to build and test
BASE_IMAGE_RUNTIME, BASE_IMAGE_RUNTIME_TAG dotnet/aspnet, 10.0-alpine The runtime image the API runs on
Service What it is Port
api The image, built from the run stage 7330, inside the container too
otel-collector The OpenTelemetry Collector, configured by otel-collector.yaml 7333 (gRPC), 7334 (HTTP)
aspire-dashboard The Aspire dashboard, where the collector sends everything 7332

The ports are the ones on your machine. Each template has its own block of ten, so this one uses 7330 to 7339 and runs beside a solution made from any other template: Minimal API 7310, MCP 7320, GraphQL 7330, Web API 7340 and Lambda Function 7350. The app uses the same port inside its container; the dashboard and collector keep their usual ones.

The api service runs with DOTNET_ENVIRONMENT=docker, mounts the movie-reviews-data volume at /app/data, and sends its logs, traces and metrics over OTLP to otel-collector, which forwards them to aspire-dashboard.

The app always collects OpenTelemetry traces and metrics, and exports them, along with its logs, only when OTEL_EXPORTER_OTLP_ENDPOINT is set. These are the standard OpenTelemetry settings, read as environment variables or from any other configuration source.

Setting Default Description
OTEL_EXPORTER_OTLP_ENDPOINT none Where to send traces, metrics and logs. Nothing is exported until it’s set. Docker Compose sets it to the otel-collector service
OTEL_EXPORTER_OTLP_PROTOCOL grpc grpc or http/protobuf
OTEL_EXPORTER_OTLP_HEADERS none Headers for every export, such as an API key for a hosted backend
OTEL_SERVICE_NAME Your solution’s name The service.name on everything sent

Every span, metric and log also carries service.version, the version stamped into the build, and deployment.environment.name.

src/Presentation/Properties/launchSettings.json sets DOTNET_ENVIRONMENT=local and listens on http://localhost:7330 and https://localhost:7331.