In a locally launched application in .NET 5, SWAGGER works without any problems. (also on Docker installed in Windows 10) In the Digital Ocean cloud (with automatic building and running of applications directly from the Github branch) SWAGGER does not work (even the swagger.json file cannot see) The difference I can see is that DigitalOcean ..
I created the default REST API in NET 5 using Visual Studio 2019. I added Dockerfile like below # https://hub.docker.com/_/microsoft-dotnet-core FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /source # copy csproj and restore as distinct layers COPY *.sln . COPY doma_api/*.csproj ./doma_api/ RUN dotnet restore # copy everything else and build app COPY doma_api/. ./doma_api/ WORKDIR /source/doma_api ..