API reference
Method CreateDockerCaddyConfig
- Namespace
- DisCatSharp.Hosting.AspNetCore.Deployment
- Assembly
- DisCatSharp.Hosting.AspNetCore.dll
CreateDockerCaddyConfig(Uri, string, int, DiscordAspNetCoreIngressOptions?, Uri?)
Creates a Caddy configuration snippet tailored for a Docker network where the ASP.NET Core app is addressed by service name.
public static string CreateDockerCaddyConfig(Uri publicBaseUrl, string upstreamServiceName, int upstreamPort, DiscordAspNetCoreIngressOptions? options = null, Uri? upstreamBaseUrl = null)
Parameters
publicBaseUrlUriThe externally visible base URL.
upstreamServiceNamestringThe Docker service name for the ASP.NET Core container.
upstreamPortintThe ASP.NET Core container port.
optionsDiscordAspNetCoreIngressOptionsOptional ingress route options. Defaults to package defaults.
upstreamBaseUrlUriOptional upstream base URL used to compute path rewrites. Defaults to
http://internal/.
Returns
- string
A Caddyfile snippet.