Deployment
Relay is three ASP.NET Core apps (gateway API, control-panel host, and this docs site) plus SQL Server, and optionally ClickHouse/ClickStack and Qdrant.
#Build
Build in Release with --no-restore (running instances can lock Debug DLLs, and the environment restore is restricted):
dotnet build Application.sln -c Release --no-restore
Publish each app you deploy:
dotnet publish Application.Api -c Release -o out/api
dotnet publish Application -c Release -o out/panel
dotnet publish Application.Doc -c Release -o out/docs
#Database schema (DACPAC)
Schema is not applied by the apps at runtime — there are no EF migrations for the gateway schema. Publish the Application.Database DACPAC to the relay_gateway database (SqlPackage / Visual Studio) as part of your release. New tables/columns are authored as .sql there and mirrored in the DbContext model.
#Configuration in production
Supply secrets via environment variables or Key Vault — never committed files. At minimum:
ConnectionStrings:GatewayDb(and the Identity DB for the panel).- Each provider's key under the config name it references via
SecretRef. Encryption:MasterKey.ClickHouse:ConnectionStringandTelemetry:Backendif you want dashboards.Qdrant:Url(+ key) if you use knowledge bases.
See the full Configuration reference.
#Telemetry backend
For the standard OpenTelemetry path, run ClickStack (all-in-one image bundles ClickHouse + collector + HyperDX) and set Telemetry:Backend=otel, Gateway:Otlp:Enabled=true, Gateway:Otlp:Endpoint, and Gateway:Otlp:ApiKey (the HyperDX ingestion key). See Telemetry & dashboards.
#Networking notes
- On Windows/dev, prefer
127.0.0.1overlocalhostfor containerised dependencies (IPv4 vs. IPv6). - Restrict the control-plane CORS origins with
Cors:PanelOrigins. - The gateway API and the panel can scale independently; the response cache is per-instance (best-effort).
#This docs site
Application.Doc is self-contained (no external packages, content copied to output). Publish and host it like any static-ish ASP.NET app; it serves the Markdown under Docs/ rendered on the fly.