From f25537e21420378cf52683d7316dc027580f0938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Garc=C3=ADa=20Rodr=C3=ADguez?= Date: Fri, 18 Dec 2020 13:41:36 +0100 Subject: [PATCH] dockerfiles and update nugets --- src/Services/Webhooks/Webhooks.API/Dockerfile | 4 ++-- src/Web/WebStatus/Dockerfile | 4 ++-- src/Web/WebStatus/Program.cs | 2 +- src/Web/WebStatus/Startup.cs | 5 ++++- src/Web/WebStatus/WebStatus.csproj | 1 + src/Web/WebhookClient/Dockerfile | 2 +- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Services/Webhooks/Webhooks.API/Dockerfile b/src/Services/Webhooks/Webhooks.API/Dockerfile index 6f72dbcf0..9c83de00b 100644 --- a/src/Services/Webhooks/Webhooks.API/Dockerfile +++ b/src/Services/Webhooks/Webhooks.API/Dockerfile @@ -1,8 +1,8 @@ -FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base +FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles diff --git a/src/Web/WebStatus/Dockerfile b/src/Web/WebStatus/Dockerfile index e7e66eb7e..7d31cd34b 100644 --- a/src/Web/WebStatus/Dockerfile +++ b/src/Web/WebStatus/Dockerfile @@ -1,8 +1,8 @@ -FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base +FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles diff --git a/src/Web/WebStatus/Program.cs b/src/Web/WebStatus/Program.cs index 057caed52..a06f0b142 100644 --- a/src/Web/WebStatus/Program.cs +++ b/src/Web/WebStatus/Program.cs @@ -116,5 +116,5 @@ void LogPackagesVersionInfo() public class Program { private static readonly string _namespace = typeof(Startup).Namespace; - public static readonly string AppName = _namespace.Substring(_namespace.LastIndexOf('.', _namespace.LastIndexOf('.') - 1) + 1); + public static readonly string AppName = _namespace; } \ No newline at end of file diff --git a/src/Web/WebStatus/Startup.cs b/src/Web/WebStatus/Startup.cs index bb7af4ab0..e92217851 100644 --- a/src/Web/WebStatus/Startup.cs +++ b/src/Web/WebStatus/Startup.cs @@ -30,7 +30,10 @@ namespace WebStatus services.AddHealthChecks() .AddCheck("self", () => HealthCheckResult.Healthy()); - services.AddHealthChecksUI(); + services + .AddHealthChecksUI() + .AddInMemoryStorage(); + services.AddMvc() .SetCompatibilityVersion(CompatibilityVersion.Version_3_0); } diff --git a/src/Web/WebStatus/WebStatus.csproj b/src/Web/WebStatus/WebStatus.csproj index 790e5c06b..c90416e0f 100644 --- a/src/Web/WebStatus/WebStatus.csproj +++ b/src/Web/WebStatus/WebStatus.csproj @@ -10,6 +10,7 @@ + diff --git a/src/Web/WebhookClient/Dockerfile b/src/Web/WebhookClient/Dockerfile index 8f3715ca3..6caaf633b 100644 --- a/src/Web/WebhookClient/Dockerfile +++ b/src/Web/WebhookClient/Dockerfile @@ -3,7 +3,7 @@ WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/core/sdk:5.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles