API reference
Method CreateTraefikDockerLabels
- Namespace
- DisCatSharp.Hosting.AspNetCore.Deployment
- Assembly
- DisCatSharp.Hosting.AspNetCore.dll
CreateTraefikDockerLabels(Uri, string, int, DiscordAspNetCoreIngressOptions?, Uri?)
Creates Traefik Docker labels that route the public ingress surface to the ASP.NET Core container.
public static IReadOnlyDictionary<string, string> CreateTraefikDockerLabels(Uri publicBaseUrl, string routerName, int containerPort, DiscordAspNetCoreIngressOptions? options = null, Uri? upstreamBaseUrl = null)
Parameters
publicBaseUrlUriThe externally visible base URL.
routerNamestringThe Traefik router and service name prefix.
containerPortintThe container port exposed by the ASP.NET Core app.
optionsDiscordAspNetCoreIngressOptionsOptional ingress route options. Defaults to package defaults.
upstreamBaseUrlUriOptional upstream base URL used to compute path rewrites. Defaults to
http://internal/.
Returns
- IReadOnlyDictionary<string, string>
The Traefik labels keyed by label name.