From 563013e1249d98a4711fc5aa6cda50d0a3a28b65 Mon Sep 17 00:00:00 2001 From: Chika Date: Mon, 17 May 2021 11:10:28 +0300 Subject: [PATCH] override port --- ELT/Dockerfile | 21 --------------------- ELT/Program.cs | 6 +++++- ELT/Properties/launchSettings.json | 2 +- 3 files changed, 6 insertions(+), 23 deletions(-) delete mode 100644 ELT/Dockerfile diff --git a/ELT/Dockerfile b/ELT/Dockerfile deleted file mode 100644 index e9a0d0e..0000000 --- a/ELT/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. - -FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base -WORKDIR /app -EXPOSE 80 - -FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build -WORKDIR /src -COPY ["ELT/ELT.csproj", "ELT/"] -RUN dotnet restore "ELT/ELT.csproj" -COPY . . -WORKDIR "/src/ELT" -RUN dotnet build "ELT.csproj" -c Release -o /app/build - -FROM build AS publish -RUN dotnet publish "ELT.csproj" -c Release -o /app/publish - -FROM base AS final -WORKDIR /app -COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "ELT.dll"] \ No newline at end of file diff --git a/ELT/Program.cs b/ELT/Program.cs index 85b9163..3790afb 100644 --- a/ELT/Program.cs +++ b/ELT/Program.cs @@ -13,7 +13,11 @@ namespace ELT public static IHostBuilder CreateHostBuilder(string[] args) { return Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }); + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + webBuilder.UseKestrel(options => { options.ListenAnyIP(2121); }); + }); } } } \ No newline at end of file diff --git a/ELT/Properties/launchSettings.json b/ELT/Properties/launchSettings.json index 381433c..b4d9618 100644 --- a/ELT/Properties/launchSettings.json +++ b/ELT/Properties/launchSettings.json @@ -26,7 +26,7 @@ "eltPassword": "evo12345", "eltLogin": "dmitrienko" }, - "applicationUrl": "http://localhost:5000" + "applicationUrl": "http://localhost:2121" }, "Docker": { "commandName": "Docker",