Giraffe
Giraffe copied to clipboard
Current template lacks fsproj items needed to run in official ASP.NET docker containers
Hello,
While I don't know if the Giraffe team would prefer to update the template or update the docs, currently the fsproj file needs the following lines added in order to run in the official ASP.NET Docker containers:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<!-- Previous items in the first property group -->
**<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
<AspNetCoreModuleName>AspNetCoreModuleV2</AspNetCoreModuleName>**
</PropertyGroup>
I don't know what the oldest version of .NET Core and ASP.NET Core that support these two is, but I know they work in ASP.NET 3.1.
Oh, thanks for bringing this to our attention! Have you got a pointer to an official ASP.NET Core documentation section which outlines why or when one needs this in order to work with the .NET Docker image? I'll add that to the docs then!
I mean, the in-process part is a bit confusing, but it doesn't seem like it ever runs on Linux or Mac -- the best case is that on those platforms, ASP.NET might not respect the setting: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/in-process-hosting?view=aspnetcore-6.0
AspNetCoreModuleV1 is deprecated, so that's why that one should change.
OutOfProcess hosting works with IIS, but with slightly reduced performance. InProcess does not run on Linux or Mac at all, from what I can tell.
Up.
Do you guys still think this is something we can add to the documentation?
I hit this issue in my first 10 minutes of learning F# & Giraffe. Quite baffling to a newbie. Yes, I ran dotnet publish -c Release
in the first 10 minutes because I wanted to see the size of a simple Giraffe App.