Moving Dockerfile to the root
This commit is contained in:
parent
8c7a5e65fb
commit
d6ab6fa402
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
appsettings.json
|
||||
**/bin/
|
||||
**/obj/
|
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["Newsbot.Portal.Blazor.Server/Newsbot.Portal.Blazor.Server.csproj", "Newsbot.Portal.Blazor.Server/"]
|
||||
RUN dotnet restore "Newsbot.Portal.Blazor.Server/Newsbot.Portal.Blazor.Server.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/Newsbot.Portal.Blazor.Server"
|
||||
RUN dotnet build "Newsbot.Portal.Blazor.Server.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "Newsbot.Portal.Blazor.Server.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "Newsbot.Portal.Blazor.Server.dll"]
|
@ -2,6 +2,6 @@ namespace Newsbot.Portal.Blazor.Server;
|
||||
|
||||
public static class Global
|
||||
{
|
||||
public static HttpClient HttpClient { get; set; }
|
||||
public static HttpClient? HttpClient { get; set; }
|
||||
public static string? DefaultInstanceUri { get; set; }
|
||||
}
|
Loading…
Reference in New Issue
Block a user