Open MichaelMay81 opened 4 months ago
One way to activate this, was to add it by hand:
match System.Environment.GetEnvironmentVariable "ASPNETCORE_HTTP_PORTS" with | null -> () | port -> webHost.UseUrls $"http://localhost:{port}" |> ignore
Hmm, normally this should work. The Bolero project template uses WebApplication.CreateBuilder
, just like standard ASP.NET Core templates, and not the older WebHost.CreateDefaultBuilder
that the documentation says doesn't support ASPNETCORE_HTTP_PORTS.
I just tried the latest template (version 0.23.19) and it seems to use the older WebHost.CreateDefaultBuilder
.
According to dotnet new update --check-only
, version 0.23.19 is the latest project template, but I can see newer versions here:
https://github.com/fsbolero/Template/releases
How do I get these newer versions?
I want to deploy Bolero in the aspnet docker image from Microsoft. This needs the app to listen on port 8080. The image enforces this with the env variable ASPNETCORE_HTTP_PORTS. But Bolero seems to ignore this.
Anyone know how do I get this env variable to work? Or a workaround?