From 357fa809798b21cc322f655b2456bb9eb9591158 Mon Sep 17 00:00:00 2001 From: selmankoc Date: Mon, 2 Dec 2024 14:01:40 +0300 Subject: [PATCH 01/11] Update runtime version to .net9 --- src/EventHub.Admin.HttpApi.Host/Dockerfile | 2 +- src/EventHub.Admin.HttpApi.Host/Dockerfile.azure | 2 +- src/EventHub.BackgroundServices/Dockerfile | 2 +- src/EventHub.BackgroundServices/Dockerfile.azure | 2 +- src/EventHub.DbMigrator/Dockerfile | 2 +- src/EventHub.DbMigrator/Dockerfile.azure | 2 +- src/EventHub.HttpApi.Host/Dockerfile | 2 +- src/EventHub.HttpApi.Host/Dockerfile.azure | 2 +- src/EventHub.IdentityServer/Dockerfile | 2 +- src/EventHub.IdentityServer/Dockerfile.azure | 2 +- src/EventHub.Web/Dockerfile | 2 +- src/EventHub.Web/Dockerfile.azure | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/EventHub.Admin.HttpApi.Host/Dockerfile b/src/EventHub.Admin.HttpApi.Host/Dockerfile index 3ff577d..1e651c9 100644 --- a/src/EventHub.Admin.HttpApi.Host/Dockerfile +++ b/src/EventHub.Admin.HttpApi.Host/Dockerfile @@ -1,4 +1,4 @@ - FROM mcr.microsoft.com/dotnet/aspnet:8.0 + FROM mcr.microsoft.com/dotnet/aspnet:9.0 COPY bin/Release/net9.0/publish/ app/ WORKDIR /app EXPOSE 80 diff --git a/src/EventHub.Admin.HttpApi.Host/Dockerfile.azure b/src/EventHub.Admin.HttpApi.Host/Dockerfile.azure index 0067a91..ee5ac5a 100644 --- a/src/EventHub.Admin.HttpApi.Host/Dockerfile.azure +++ b/src/EventHub.Admin.HttpApi.Host/Dockerfile.azure @@ -5,7 +5,7 @@ FROM ${BASE_IMAGE} AS base WORKDIR /app/eventhub/src/EventHub.Admin.HttpApi.Host RUN dotnet publish -c Release -o bin/Release/publish -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS publish +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS publish WORKDIR /app EXPOSE 80 ENV ASPNETCORE_URLS=http://+:80 diff --git a/src/EventHub.BackgroundServices/Dockerfile b/src/EventHub.BackgroundServices/Dockerfile index 4bb545b..0ecb572 100644 --- a/src/EventHub.BackgroundServices/Dockerfile +++ b/src/EventHub.BackgroundServices/Dockerfile @@ -1,4 +1,4 @@ - FROM mcr.microsoft.com/dotnet/aspnet:8.0 + FROM mcr.microsoft.com/dotnet/aspnet:9.0 COPY bin/Release/net9.0/ app/ WORKDIR /app EXPOSE 80 diff --git a/src/EventHub.BackgroundServices/Dockerfile.azure b/src/EventHub.BackgroundServices/Dockerfile.azure index 88eec18..d629a07 100644 --- a/src/EventHub.BackgroundServices/Dockerfile.azure +++ b/src/EventHub.BackgroundServices/Dockerfile.azure @@ -5,7 +5,7 @@ FROM ${BASE_IMAGE} AS base WORKDIR /app/eventhub/src/EventHub.BackgroundServices RUN dotnet publish -c Release -o bin/Release/publish -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS publish +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS publish WORKDIR /app EXPOSE 80 ENV ASPNETCORE_URLS=http://+:80 diff --git a/src/EventHub.DbMigrator/Dockerfile b/src/EventHub.DbMigrator/Dockerfile index a3a2b0c..9fc2d67 100644 --- a/src/EventHub.DbMigrator/Dockerfile +++ b/src/EventHub.DbMigrator/Dockerfile @@ -1,4 +1,4 @@ - FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy + FROM mcr.microsoft.com/dotnet/aspnet:9.0-jammy COPY bin/Release/net9.0/ app/ WORKDIR /app EXPOSE 80 diff --git a/src/EventHub.DbMigrator/Dockerfile.azure b/src/EventHub.DbMigrator/Dockerfile.azure index 883281e..786c5e8 100644 --- a/src/EventHub.DbMigrator/Dockerfile.azure +++ b/src/EventHub.DbMigrator/Dockerfile.azure @@ -5,7 +5,7 @@ FROM ${BASE_IMAGE} AS base WORKDIR /app/eventhub/src/EventHub.DbMigrator RUN dotnet publish -c Release -o bin/Release/publish -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS publish +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS publish WORKDIR /app COPY --from=base /app/eventhub/src/EventHub.DbMigrator/bin/Release/publish . ENTRYPOINT ["dotnet", "EventHub.DbMigrator.dll"] \ No newline at end of file diff --git a/src/EventHub.HttpApi.Host/Dockerfile b/src/EventHub.HttpApi.Host/Dockerfile index eec80a0..aa76c3b 100644 --- a/src/EventHub.HttpApi.Host/Dockerfile +++ b/src/EventHub.HttpApi.Host/Dockerfile @@ -1,4 +1,4 @@ - FROM mcr.microsoft.com/dotnet/aspnet:8.0 + FROM mcr.microsoft.com/dotnet/aspnet:9.0 COPY bin/Release/net9.0/publish/ app/ WORKDIR /app EXPOSE 80 diff --git a/src/EventHub.HttpApi.Host/Dockerfile.azure b/src/EventHub.HttpApi.Host/Dockerfile.azure index 9c3795e..658c801 100644 --- a/src/EventHub.HttpApi.Host/Dockerfile.azure +++ b/src/EventHub.HttpApi.Host/Dockerfile.azure @@ -5,7 +5,7 @@ FROM ${BASE_IMAGE} AS base WORKDIR /app/eventhub/src/EventHub.HttpApi.Host RUN dotnet publish -c Release -o bin/Release/publish -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS publish +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS publish WORKDIR /app EXPOSE 80 ENV ASPNETCORE_URLS=http://+:80 diff --git a/src/EventHub.IdentityServer/Dockerfile b/src/EventHub.IdentityServer/Dockerfile index 55ba98e..a97966b 100644 --- a/src/EventHub.IdentityServer/Dockerfile +++ b/src/EventHub.IdentityServer/Dockerfile @@ -1,4 +1,4 @@ - FROM mcr.microsoft.com/dotnet/aspnet:8.0 + FROM mcr.microsoft.com/dotnet/aspnet:9.0 COPY bin/Release/net9.0/publish/ app/ WORKDIR /app EXPOSE 80 diff --git a/src/EventHub.IdentityServer/Dockerfile.azure b/src/EventHub.IdentityServer/Dockerfile.azure index 97c0874..6e797c2 100644 --- a/src/EventHub.IdentityServer/Dockerfile.azure +++ b/src/EventHub.IdentityServer/Dockerfile.azure @@ -5,7 +5,7 @@ FROM ${BASE_IMAGE} AS base WORKDIR /app/eventhub/src/EventHub.IdentityServer RUN dotnet publish -c Release -o bin/Release/publish -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS publish +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS publish WORKDIR /app EXPOSE 80 ENV ASPNETCORE_URLS=http://+:80 diff --git a/src/EventHub.Web/Dockerfile b/src/EventHub.Web/Dockerfile index 5c16455..74ea933 100644 --- a/src/EventHub.Web/Dockerfile +++ b/src/EventHub.Web/Dockerfile @@ -1,4 +1,4 @@ - FROM mcr.microsoft.com/dotnet/aspnet:8.0 + FROM mcr.microsoft.com/dotnet/aspnet:9.0 COPY bin/Release/net9.0/publish/ app/ WORKDIR /app EXPOSE 80 diff --git a/src/EventHub.Web/Dockerfile.azure b/src/EventHub.Web/Dockerfile.azure index 40c5640..792d05f 100644 --- a/src/EventHub.Web/Dockerfile.azure +++ b/src/EventHub.Web/Dockerfile.azure @@ -5,7 +5,7 @@ FROM ${BASE_IMAGE} AS base WORKDIR /app/eventhub/src/EventHub.Web RUN dotnet publish -c Release -o bin/Release/publish -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS publish +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS publish WORKDIR /app EXPOSE 80 ENV ASPNETCORE_URLS=http://+:80 From a88a915d0e0c86bbab19388bbf529cc4b59fb729 Mon Sep 17 00:00:00 2001 From: selmankoc Date: Mon, 2 Dec 2024 14:03:10 +0300 Subject: [PATCH 02/11] Update dockerfile sdk version to .net9 --- etc/azure/Dockerfile.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/azure/Dockerfile.base b/etc/azure/Dockerfile.base index 5b67d38..3655948 100644 --- a/etc/azure/Dockerfile.base +++ b/etc/azure/Dockerfile.base @@ -1,3 +1,3 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build WORKDIR /app COPY . . \ No newline at end of file From 05cd15f7c61290adb9be4e4288f3cf4f6ae26b4c Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 24 Jan 2025 14:56:21 +0800 Subject: [PATCH 03/11] FIx logout problem --- .../EventHub.IdentityServer.csproj | 2 +- .../Pages/Account/LoggedOut.cshtml | 34 ++++++++++--------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj b/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj index a686d69..2134161 100644 --- a/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj +++ b/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj @@ -48,7 +48,7 @@ - + diff --git a/src/EventHub.IdentityServer/Pages/Account/LoggedOut.cshtml b/src/EventHub.IdentityServer/Pages/Account/LoggedOut.cshtml index c088de1..f890a83 100644 --- a/src/EventHub.IdentityServer/Pages/Account/LoggedOut.cshtml +++ b/src/EventHub.IdentityServer/Pages/Account/LoggedOut.cshtml @@ -1,4 +1,5 @@ -page "/Account/LoggedOut" +@page "/Account/LoggedOut" + @using Microsoft.AspNetCore.Mvc.Localization @using Volo.Abp.Account.Localization @using Volo.Abp.Account.Web.Pages.Account @@ -18,18 +19,19 @@ page "/Account/LoggedOut" @section styles { } - - - - @L["LoggedOutTitle"] - @L["LoggedOutText"] - @if (Model.PostLogoutRedirectUri != null) - { - @L["ReturnToText"] - } - @if (Model.SignOutIframeUrl != null) - { - - } - - \ No newline at end of file +
+ + + @L["LoggedOutTitle"] + @L["LoggedOutText"] + @if (Model.PostLogoutRedirectUri != null) + { + @L["ReturnToText"] + } + @if (Model.SignOutIframeUrl != null) + { + + } + + +
\ No newline at end of file From dd1f7aa74379835743a3d215c61c1935be2f5d48 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 24 Jan 2025 15:23:23 +0800 Subject: [PATCH 04/11] Fix login problem --- .../Themes/EventHub/Components/MainNavbar/Default.cshtml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml index a8bb708..268d49f 100644 --- a/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml @@ -14,10 +14,17 @@ @{ var returnUrl = WebUtility.UrlEncode(Context.Request.GetEncodedPathAndQuery()); + + if(Context.Request.Path.Equals("/Account/Login", StringComparison.OrdinalIgnoreCase)) + { + returnUrl = WebUtility.UrlEncode(Context.Request.Query["returnUrl"]); + } + if (returnUrl.IsNullOrWhiteSpace()) { returnUrl = "/"; } + }