FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src

COPY ["For Real Consulting/For Real Consulting/For Real Consulting.csproj", "For Real Consulting/For Real Consulting/"]
RUN dotnet restore "For Real Consulting/For Real Consulting/For Real Consulting.csproj"

COPY . .
WORKDIR "/src/For Real Consulting/For Real Consulting"
RUN dotnet publish "For Real Consulting.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
WORKDIR /app
COPY --from=build /app/publish .

EXPOSE 8080
ENV ASPNETCORE_URLS=http://+:8080
ENTRYPOINT ["dotnet", "For_Real_Consulting.dll"]
