From 2f228f3cd882f4ee39f43162c96c3719bdaff04a Mon Sep 17 00:00:00 2001 From: Mohammad Hamed Date: Sat, 18 Feb 2023 17:50:57 +0330 Subject: [PATCH 1/2] upgraded from .net core 5 to .net core 6.0 --- src/ApiGateways/OcelotApiGw/Dockerfile | 4 ++-- src/ApiGateways/OcelotApiGw/OcelotApiGw.csproj | 2 +- src/ApiGateways/Shopping.Aggregator/Dockerfile | 4 ++-- .../Shopping.Aggregator/Shopping.Aggregator.csproj | 2 +- .../Common.Logging/Common.Logging.csproj | 8 ++++---- .../EventBus.Messages/EventBus.Messages.csproj | 2 +- src/Services/Basket/Basket.API/Basket.API.csproj | 2 +- src/Services/Basket/Basket.API/Dockerfile | 4 ++-- .../Basket/Basket.UnitTests/Basket.UnitTests.csproj | 6 +++--- src/Services/Catalog/Catalog.API/Catalog.API.csproj | 2 +- .../Catalog.API/Controllers/CatalogController.cs | 1 + src/Services/Catalog/Catalog.API/Dockerfile | 4 ++-- .../Catalog.UnitTests/Catalog.UnitTests.csproj | 6 +++--- .../Discount/Discount.API/Discount.API.csproj | 2 +- src/Services/Discount/Discount.API/Dockerfile | 4 ++-- .../Discount/Discount.Grpc/Discount.Grpc.csproj | 2 +- src/Services/Discount/Discount.Grpc/Dockerfile | 4 ++-- .../Discount.UnitTests/Discount.UnitTests.csproj | 6 +++--- src/Services/Ordering/Ordering.API/Dockerfile | 4 ++-- .../Ordering/Ordering.API/Ordering.API.csproj | 4 ++-- .../Ordering.Application/Ordering.Application.csproj | 12 ++++++------ .../Ordering/Ordering.Domain/Ordering.Domain.csproj | 2 +- .../Ordering.Infrastructure.csproj | 6 +++--- src/WebApps/AspnetRunBasics/AspnetRunBasics.csproj | 10 +++++----- src/WebApps/AspnetRunBasics/Dockerfile | 4 ++-- src/WebApps/WebStatus/Dockerfile | 4 ++-- src/WebApps/WebStatus/WebStatus.csproj | 8 ++++---- 27 files changed, 60 insertions(+), 59 deletions(-) diff --git a/src/ApiGateways/OcelotApiGw/Dockerfile b/src/ApiGateways/OcelotApiGw/Dockerfile index b753338b..818efd70 100644 --- a/src/ApiGateways/OcelotApiGw/Dockerfile +++ b/src/ApiGateways/OcelotApiGw/Dockerfile @@ -1,10 +1,10 @@ #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/aspnet:5.0-buster-slim AS base +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY ["ApiGateways/OcelotApiGw/OcelotApiGw.csproj", "ApiGateways/OcelotApiGw/"] COPY ["BuildingBlocks/Common.Logging/Common.Logging.csproj", "BuildingBlocks/Common.Logging/"] diff --git a/src/ApiGateways/OcelotApiGw/OcelotApiGw.csproj b/src/ApiGateways/OcelotApiGw/OcelotApiGw.csproj index c6a4832b..8c810bc9 100644 --- a/src/ApiGateways/OcelotApiGw/OcelotApiGw.csproj +++ b/src/ApiGateways/OcelotApiGw/OcelotApiGw.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 ..\..\docker-compose.dcproj Linux ..\.. diff --git a/src/ApiGateways/Shopping.Aggregator/Dockerfile b/src/ApiGateways/Shopping.Aggregator/Dockerfile index 7ffda6e7..d7f3a482 100644 --- a/src/ApiGateways/Shopping.Aggregator/Dockerfile +++ b/src/ApiGateways/Shopping.Aggregator/Dockerfile @@ -1,10 +1,10 @@ #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/aspnet:5.0-buster-slim AS base +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY ["ApiGateways/Shopping.Aggregator/Shopping.Aggregator.csproj", "ApiGateways/Shopping.Aggregator/"] COPY ["BuildingBlocks/Common.Logging/Common.Logging.csproj", "BuildingBlocks/Common.Logging/"] diff --git a/src/ApiGateways/Shopping.Aggregator/Shopping.Aggregator.csproj b/src/ApiGateways/Shopping.Aggregator/Shopping.Aggregator.csproj index 19b91443..3984f1ca 100644 --- a/src/ApiGateways/Shopping.Aggregator/Shopping.Aggregator.csproj +++ b/src/ApiGateways/Shopping.Aggregator/Shopping.Aggregator.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 ..\..\docker-compose.dcproj Linux ..\.. diff --git a/src/BuildingBlocks/Common.Logging/Common.Logging.csproj b/src/BuildingBlocks/Common.Logging/Common.Logging.csproj index 350909da..991aeed3 100644 --- a/src/BuildingBlocks/Common.Logging/Common.Logging.csproj +++ b/src/BuildingBlocks/Common.Logging/Common.Logging.csproj @@ -1,13 +1,13 @@  - net5.0 + net6.0 - - - + + + diff --git a/src/BuildingBlocks/EventBus.Messages/EventBus.Messages.csproj b/src/BuildingBlocks/EventBus.Messages/EventBus.Messages.csproj index f208d303..dbc15171 100644 --- a/src/BuildingBlocks/EventBus.Messages/EventBus.Messages.csproj +++ b/src/BuildingBlocks/EventBus.Messages/EventBus.Messages.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 diff --git a/src/Services/Basket/Basket.API/Basket.API.csproj b/src/Services/Basket/Basket.API/Basket.API.csproj index a071d5c1..6918262e 100644 --- a/src/Services/Basket/Basket.API/Basket.API.csproj +++ b/src/Services/Basket/Basket.API/Basket.API.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 ..\..\..\docker-compose.dcproj Linux ..\..\.. diff --git a/src/Services/Basket/Basket.API/Dockerfile b/src/Services/Basket/Basket.API/Dockerfile index 29562421..d810db7f 100644 --- a/src/Services/Basket/Basket.API/Dockerfile +++ b/src/Services/Basket/Basket.API/Dockerfile @@ -1,10 +1,10 @@ #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/aspnet:5.0-buster-slim AS base +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY ["Services/Basket/Basket.API/Basket.API.csproj", "Services/Basket/Basket.API/"] COPY ["BuildingBlocks/EventBus.Messages/EventBus.Messages.csproj", "BuildingBlocks/EventBus.Messages/"] diff --git a/src/Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj b/src/Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj index aaf45b31..b9620dbe 100644 --- a/src/Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj +++ b/src/Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj @@ -1,15 +1,15 @@ - net5.0 + net6.0 false - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Services/Catalog/Catalog.API/Catalog.API.csproj b/src/Services/Catalog/Catalog.API/Catalog.API.csproj index e2f05f16..affbbfaa 100644 --- a/src/Services/Catalog/Catalog.API/Catalog.API.csproj +++ b/src/Services/Catalog/Catalog.API/Catalog.API.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 ..\..\..\docker-compose.dcproj Linux ..\..\.. diff --git a/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs b/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs index 96578c0c..271b8085 100644 --- a/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs +++ b/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs @@ -95,3 +95,4 @@ public async Task DeleteProductById(string id) } } } + diff --git a/src/Services/Catalog/Catalog.API/Dockerfile b/src/Services/Catalog/Catalog.API/Dockerfile index 8e964df2..b5109d32 100644 --- a/src/Services/Catalog/Catalog.API/Dockerfile +++ b/src/Services/Catalog/Catalog.API/Dockerfile @@ -1,10 +1,10 @@ #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/aspnet:5.0-buster-slim AS base +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY ["Services/Catalog/Catalog.API/Catalog.API.csproj", "Services/Catalog/Catalog.API/"] COPY ["BuildingBlocks/Common.Logging/Common.Logging.csproj", "BuildingBlocks/Common.Logging/"] diff --git a/src/Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj b/src/Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj index aaf45b31..b9620dbe 100644 --- a/src/Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj +++ b/src/Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj @@ -1,15 +1,15 @@ - net5.0 + net6.0 false - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Services/Discount/Discount.API/Discount.API.csproj b/src/Services/Discount/Discount.API/Discount.API.csproj index 7c6acd16..667a600b 100644 --- a/src/Services/Discount/Discount.API/Discount.API.csproj +++ b/src/Services/Discount/Discount.API/Discount.API.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 ..\..\..\docker-compose.dcproj Linux ..\..\.. diff --git a/src/Services/Discount/Discount.API/Dockerfile b/src/Services/Discount/Discount.API/Dockerfile index 1c43427b..4eee58e1 100644 --- a/src/Services/Discount/Discount.API/Dockerfile +++ b/src/Services/Discount/Discount.API/Dockerfile @@ -1,10 +1,10 @@ #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/aspnet:5.0-buster-slim AS base +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY ["Services/Discount/Discount.API/Discount.API.csproj", "Services/Discount/Discount.API/"] COPY ["BuildingBlocks/Common.Logging/Common.Logging.csproj", "BuildingBlocks/Common.Logging/"] diff --git a/src/Services/Discount/Discount.Grpc/Discount.Grpc.csproj b/src/Services/Discount/Discount.Grpc/Discount.Grpc.csproj index b9643fab..43183f8f 100644 --- a/src/Services/Discount/Discount.Grpc/Discount.Grpc.csproj +++ b/src/Services/Discount/Discount.Grpc/Discount.Grpc.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 ..\..\..\docker-compose.dcproj Linux ..\..\.. diff --git a/src/Services/Discount/Discount.Grpc/Dockerfile b/src/Services/Discount/Discount.Grpc/Dockerfile index d0df822d..ac3ffffc 100644 --- a/src/Services/Discount/Discount.Grpc/Dockerfile +++ b/src/Services/Discount/Discount.Grpc/Dockerfile @@ -1,10 +1,10 @@ #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/aspnet:5.0-buster-slim AS base +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY ["Services/Discount/Discount.Grpc/Discount.Grpc.csproj", "Services/Discount/Discount.Grpc/"] COPY ["BuildingBlocks/Common.Logging/Common.Logging.csproj", "BuildingBlocks/Common.Logging/"] diff --git a/src/Services/Discount/Discount.UnitTests/Discount.UnitTests.csproj b/src/Services/Discount/Discount.UnitTests/Discount.UnitTests.csproj index aaf45b31..b9620dbe 100644 --- a/src/Services/Discount/Discount.UnitTests/Discount.UnitTests.csproj +++ b/src/Services/Discount/Discount.UnitTests/Discount.UnitTests.csproj @@ -1,15 +1,15 @@ - net5.0 + net6.0 false - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Services/Ordering/Ordering.API/Dockerfile b/src/Services/Ordering/Ordering.API/Dockerfile index e8d035ee..e437e72f 100644 --- a/src/Services/Ordering/Ordering.API/Dockerfile +++ b/src/Services/Ordering/Ordering.API/Dockerfile @@ -1,10 +1,10 @@ #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/aspnet:5.0-buster-slim AS base +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY ["Services/Ordering/Ordering.API/Ordering.API.csproj", "Services/Ordering/Ordering.API/"] COPY ["Services/Ordering/Ordering.Application/Ordering.Application.csproj", "Services/Ordering/Ordering.Application/"] diff --git a/src/Services/Ordering/Ordering.API/Ordering.API.csproj b/src/Services/Ordering/Ordering.API/Ordering.API.csproj index dc6af977..014f6c2c 100644 --- a/src/Services/Ordering/Ordering.API/Ordering.API.csproj +++ b/src/Services/Ordering/Ordering.API/Ordering.API.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 ..\..\..\docker-compose.dcproj Linux ..\..\.. @@ -16,7 +16,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/Services/Ordering/Ordering.Application/Ordering.Application.csproj b/src/Services/Ordering/Ordering.Application/Ordering.Application.csproj index 487f96a2..7b009243 100644 --- a/src/Services/Ordering/Ordering.Application/Ordering.Application.csproj +++ b/src/Services/Ordering/Ordering.Application/Ordering.Application.csproj @@ -1,16 +1,16 @@  - net5.0 + net6.0 - - - - + + + + - + diff --git a/src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj b/src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj index f208d303..dbc15171 100644 --- a/src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj +++ b/src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 diff --git a/src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj b/src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj index 009bf56c..2dc59e5f 100644 --- a/src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj +++ b/src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj @@ -1,12 +1,12 @@  - net5.0 + net6.0 - - + + diff --git a/src/WebApps/AspnetRunBasics/AspnetRunBasics.csproj b/src/WebApps/AspnetRunBasics/AspnetRunBasics.csproj index af80195d..9ebfb2bd 100644 --- a/src/WebApps/AspnetRunBasics/AspnetRunBasics.csproj +++ b/src/WebApps/AspnetRunBasics/AspnetRunBasics.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 cd5124f0-00bb-4cff-b8b9-dc4e11396fa3 Linux ..\..\docker-compose.dcproj @@ -9,10 +9,10 @@ - - - - + + + + diff --git a/src/WebApps/AspnetRunBasics/Dockerfile b/src/WebApps/AspnetRunBasics/Dockerfile index 92d1747f..efba66c2 100644 --- a/src/WebApps/AspnetRunBasics/Dockerfile +++ b/src/WebApps/AspnetRunBasics/Dockerfile @@ -1,11 +1,11 @@ #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/aspnet:5.0-buster-slim AS base +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY ["WebApps/AspnetRunBasics/AspnetRunBasics.csproj", "WebApps/AspnetRunBasics/"] RUN dotnet restore "WebApps/AspnetRunBasics/AspnetRunBasics.csproj" diff --git a/src/WebApps/WebStatus/Dockerfile b/src/WebApps/WebStatus/Dockerfile index e6c60f6c..8c12da7a 100644 --- a/src/WebApps/WebStatus/Dockerfile +++ b/src/WebApps/WebStatus/Dockerfile @@ -1,10 +1,10 @@ #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/aspnet:5.0-buster-slim AS base +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY ["WebApps/WebStatus/WebStatus.csproj", "WebApps/WebStatus/"] RUN dotnet restore "WebApps/WebStatus/WebStatus.csproj" diff --git a/src/WebApps/WebStatus/WebStatus.csproj b/src/WebApps/WebStatus/WebStatus.csproj index cc543a44..57821811 100644 --- a/src/WebApps/WebStatus/WebStatus.csproj +++ b/src/WebApps/WebStatus/WebStatus.csproj @@ -1,16 +1,16 @@ - net5.0 + net6.0 ..\..\docker-compose.dcproj Linux ..\.. - - - + + + From 9fec2dfafa256888c94774f725f3aa29076b73c7 Mon Sep 17 00:00:00 2001 From: Mohammad Hamed Date: Tue, 21 Feb 2023 13:12:23 +0330 Subject: [PATCH 2/2] port number made numeric in ocelot.json file. --- src/ApiGateways/OcelotApiGw/ocelot.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ApiGateways/OcelotApiGw/ocelot.json b/src/ApiGateways/OcelotApiGw/ocelot.json index a0209b7d..c968b90c 100644 --- a/src/ApiGateways/OcelotApiGw/ocelot.json +++ b/src/ApiGateways/OcelotApiGw/ocelot.json @@ -7,7 +7,7 @@ "DownstreamHostAndPorts": [ { "Host": "localhost", - "Port": "8000" + "Port": 8000 } ], "UpstreamPathTemplate": "/Catalog", @@ -20,7 +20,7 @@ "DownstreamHostAndPorts": [ { "Host": "localhost", - "Port": "8000" + "Port": 8000 } ], "UpstreamPathTemplate": "/Catalog/{id}", @@ -32,7 +32,7 @@ "DownstreamHostAndPorts": [ { "Host": "localhost", - "Port": "8000" + "Port": 8000 } ], "UpstreamPathTemplate": "/Catalog/GetProductByCategory/{category}", @@ -45,7 +45,7 @@ "DownstreamHostAndPorts": [ { "Host": "localhost", - "Port": "8001" + "Port": 8001 } ], "UpstreamPathTemplate": "/Basket/{userName}", @@ -57,7 +57,7 @@ "DownstreamHostAndPorts": [ { "Host": "localhost", - "Port": "8001" + "Port": 8001 } ], "UpstreamPathTemplate": "/Basket", @@ -69,7 +69,7 @@ "DownstreamHostAndPorts": [ { "Host": "localhost", - "Port": "8001" + "Port": 8001 } ], "UpstreamPathTemplate": "/Basket/Checkout", @@ -89,7 +89,7 @@ "DownstreamHostAndPorts": [ { "Host": "localhost", - "Port": "8002" + "Port": 8002 } ], "UpstreamPathTemplate": "/Discount/{productName}", @@ -101,7 +101,7 @@ "DownstreamHostAndPorts": [ { "Host": "localhost", - "Port": "8002" + "Port": 8002 } ], "UpstreamPathTemplate": "/Discount", @@ -114,7 +114,7 @@ "DownstreamHostAndPorts": [ { "Host": "localhost", - "Port": "8004" + "Port": 8004 } ], "UpstreamPathTemplate": "/Order/{userName}",