diff --git a/.vscode/settings.json b/.vscode/settings.json index ca33898b..c78d85b9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,9 +22,11 @@ "cSpell.enabled": true, "cSpell.words": [ "Bohner", + "buildtransitive", "Butzer", "Cereceda", "choco", + "contentfiles", "Creds", "DOCKERHUB", "Eulerian", @@ -35,6 +37,7 @@ "howpublished", "Kolosov", "Mathematica", + "Npgsql", "OEIS", "opencover", "ORCID", @@ -44,6 +47,7 @@ "Refactorization", "Riordan", "SOURCEBRANCHNAME", + "Swashbuckle", "tabl", "updatebuildnumber", "vstest", diff --git a/CHANGELOG.md b/CHANGELOG.md index 281f2dca..f4d890d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning v2.0.0](https://semver.org/spec/v2.0.0.html). +## [1.x.x] - In progress + +### Changed + +- Add dotnet install step to CI/CD +- Upgrade .NET version to 10 +- Organize ports for apps, containers, services + ## [1.0.0] - 18-Apr-2026 ### Changed diff --git a/azure-pipelines/templates/docker-build-push-jobs.yml b/azure-pipelines/templates/docker-build-push-jobs.yml index d4fda61b..0de6f06e 100644 --- a/azure-pipelines/templates/docker-build-push-jobs.yml +++ b/azure-pipelines/templates/docker-build-push-jobs.yml @@ -77,6 +77,10 @@ parameters: default: 'https://auth.eventtriangle.razumovsky.me/' type: string + - name: dotnetSdkVersion + type: string + default: '10.x' + jobs: - job: ${{ parameters.JobName }} displayName: ${{ parameters.JobName }} @@ -84,6 +88,12 @@ jobs: - checkout: self fetchDepth: 0 + - task: UseDotNet@2 + displayName: 'Install .NET SDK ${{ parameters.dotnetSdkVersion }}' + inputs: + packageType: 'sdk' + version: '${{ parameters.dotnetSdkVersion }}' + - task: gitversion-setup@4.5.0 displayName: 'GitVersion Setup' inputs: diff --git a/src/authorization/Dockerfile b/src/authorization/Dockerfile index 7e21e5a5..ac2cf3e7 100644 --- a/src/authorization/Dockerfile +++ b/src/authorization/Dockerfile @@ -1,7 +1,6 @@ -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base WORKDIR /app -EXPOSE 80 -EXPOSE 81 +EXPOSE 8080 ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true @@ -19,7 +18,7 @@ ARG FRONT_API_URL RUN sed -i "s|https://localhost:7000/|$FRONT_API_URL|" ./src/assets/config/config.json RUN ng build --output-path "dist/client" -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS publish WORKDIR /src COPY ["authorization/EventTriangleAPI.Authorization.BusinessLogic/EventTriangleAPI.Authorization.BusinessLogic.csproj", "authorization/EventTriangleAPI.Authorization.BusinessLogic/"] COPY ["authorization/EventTriangleAPI.Authorization.Domain/EventTriangleAPI.Authorization.Domain.csproj", "authorization/EventTriangleAPI.Authorization.Domain/"] diff --git a/src/authorization/EventTriangleAPI.Authorization.BusinessLogic/EventTriangleAPI.Authorization.BusinessLogic.csproj b/src/authorization/EventTriangleAPI.Authorization.BusinessLogic/EventTriangleAPI.Authorization.BusinessLogic.csproj index 58614443..5ecdfa67 100644 --- a/src/authorization/EventTriangleAPI.Authorization.BusinessLogic/EventTriangleAPI.Authorization.BusinessLogic.csproj +++ b/src/authorization/EventTriangleAPI.Authorization.BusinessLogic/EventTriangleAPI.Authorization.BusinessLogic.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 diff --git a/src/authorization/EventTriangleAPI.Authorization.Domain/EventTriangleAPI.Authorization.Domain.csproj b/src/authorization/EventTriangleAPI.Authorization.Domain/EventTriangleAPI.Authorization.Domain.csproj index 8afc1950..42e2a2df 100644 --- a/src/authorization/EventTriangleAPI.Authorization.Domain/EventTriangleAPI.Authorization.Domain.csproj +++ b/src/authorization/EventTriangleAPI.Authorization.Domain/EventTriangleAPI.Authorization.Domain.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 diff --git a/src/authorization/EventTriangleAPI.Authorization.IntegrationTests/EventTriangleAPI.Authorization.IntegrationTests.csproj b/src/authorization/EventTriangleAPI.Authorization.IntegrationTests/EventTriangleAPI.Authorization.IntegrationTests.csproj index f058373d..98746e54 100644 --- a/src/authorization/EventTriangleAPI.Authorization.IntegrationTests/EventTriangleAPI.Authorization.IntegrationTests.csproj +++ b/src/authorization/EventTriangleAPI.Authorization.IntegrationTests/EventTriangleAPI.Authorization.IntegrationTests.csproj @@ -1,7 +1,7 @@ - + - net8.0 + net10.0 enable enable false @@ -9,13 +9,13 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/src/authorization/EventTriangleAPI.Authorization.Persistence/EventTriangleAPI.Authorization.Persistence.csproj b/src/authorization/EventTriangleAPI.Authorization.Persistence/EventTriangleAPI.Authorization.Persistence.csproj index dcaa13c6..ac2106f9 100644 --- a/src/authorization/EventTriangleAPI.Authorization.Persistence/EventTriangleAPI.Authorization.Persistence.csproj +++ b/src/authorization/EventTriangleAPI.Authorization.Persistence/EventTriangleAPI.Authorization.Persistence.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 diff --git a/src/authorization/EventTriangleAPI.Authorization.Presentation/DependencyInjection/SwaggerServices.cs b/src/authorization/EventTriangleAPI.Authorization.Presentation/DependencyInjection/SwaggerServices.cs index 11ab95ef..c9ae085d 100644 --- a/src/authorization/EventTriangleAPI.Authorization.Presentation/DependencyInjection/SwaggerServices.cs +++ b/src/authorization/EventTriangleAPI.Authorization.Presentation/DependencyInjection/SwaggerServices.cs @@ -1,5 +1,5 @@ using System.Reflection; -using Microsoft.OpenApi.Models; +using Microsoft.OpenApi; namespace EventTriangleAPI.Authorization.Presentation.DependencyInjection; @@ -21,4 +21,4 @@ public static IServiceCollection ConfigureSwagger(this IServiceCollection servic return serviceCollection; } -} \ No newline at end of file +} diff --git a/src/authorization/EventTriangleAPI.Authorization.Presentation/EventTriangleAPI.Authorization.Presentation.csproj b/src/authorization/EventTriangleAPI.Authorization.Presentation/EventTriangleAPI.Authorization.Presentation.csproj index 6315872c..12494a8f 100644 --- a/src/authorization/EventTriangleAPI.Authorization.Presentation/EventTriangleAPI.Authorization.Presentation.csproj +++ b/src/authorization/EventTriangleAPI.Authorization.Presentation/EventTriangleAPI.Authorization.Presentation.csproj @@ -1,17 +1,17 @@ - net8.0 + net10.0 enable 12 - - - - - + + + + + diff --git a/src/authorization/EventTriangleAPI.Authorization.Presentation/Program.cs b/src/authorization/EventTriangleAPI.Authorization.Presentation/Program.cs index d0690a61..dde6d803 100644 --- a/src/authorization/EventTriangleAPI.Authorization.Presentation/Program.cs +++ b/src/authorization/EventTriangleAPI.Authorization.Presentation/Program.cs @@ -49,13 +49,18 @@ builder.Services.AddScoped(); builder.Services.AddScoped(); +// ######################################################## GRPC CONFIGS ######################################################## + builder.Services.AddGrpc(); +builder.Logging.AddFilter("Grpc", LogLevel.Debug); + +// ######################################################## GRPC CONFIGS ######################################################## + builder.Services.AddHttpClient(); builder.Services.AddTicketStore(); builder.Services.AddHostedServices(); -builder.Logging.AddFilter("Grpc", LogLevel.Debug); // redis configs start @@ -90,7 +95,7 @@ app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "EventTriangle Authorization API V1"); }); -app.UseHttpsRedirection(); +//app.UseHttpsRedirection(); app.UseHsts(); diff --git a/src/authorization/EventTriangleAPI.Authorization.Presentation/appsettings.Kubernetes.json b/src/authorization/EventTriangleAPI.Authorization.Presentation/appsettings.Kubernetes.json index df581d77..c84d6b77 100644 --- a/src/authorization/EventTriangleAPI.Authorization.Presentation/appsettings.Kubernetes.json +++ b/src/authorization/EventTriangleAPI.Authorization.Presentation/appsettings.Kubernetes.json @@ -26,7 +26,7 @@ "AzureAdTokenUrl": "https://login.microsoftonline.com/b40a105f-0643-4922-8e60-10fc1abf9c4b/oauth2/v2.0/token", "ClientSecret": "" }, - "GrpcChannelAddresses": "http://event-triangle-sender-service:81", + "GrpcChannelAddresses": "http://event-triangle-sender-service", "ReverseProxy": { "Routes": { "route1": { diff --git a/src/authorization/EventTriangleAPI.Authorization.UnitTests/EventTriangleAPI.Authorization.UnitTests.csproj b/src/authorization/EventTriangleAPI.Authorization.UnitTests/EventTriangleAPI.Authorization.UnitTests.csproj index 4bdd2610..92f5fbc1 100644 --- a/src/authorization/EventTriangleAPI.Authorization.UnitTests/EventTriangleAPI.Authorization.UnitTests.csproj +++ b/src/authorization/EventTriangleAPI.Authorization.UnitTests/EventTriangleAPI.Authorization.UnitTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 enable @@ -10,13 +10,13 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/src/consumer/Dockerfile b/src/consumer/Dockerfile index 64582055..305c1f06 100644 --- a/src/consumer/Dockerfile +++ b/src/consumer/Dockerfile @@ -1,8 +1,8 @@ -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base WORKDIR /app -EXPOSE 80 +EXPOSE 8080 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS publish WORKDIR /src COPY ["consumer/EventTriangleAPI.Consumer.Application/EventTriangleAPI.Consumer.Application.csproj", "consumer/EventTriangleAPI.Consumer.Application/"] COPY ["consumer/EventTriangleAPI.Consumer.BusinessLogic/EventTriangleAPI.Consumer.BusinessLogic.csproj", "consumer/EventTriangleAPI.Consumer.BusinessLogic/"] diff --git a/src/consumer/EventTriangleAPI.Consumer.Application/EventTriangleAPI.Consumer.Application.csproj b/src/consumer/EventTriangleAPI.Consumer.Application/EventTriangleAPI.Consumer.Application.csproj index a2a470a5..bb06f82f 100644 --- a/src/consumer/EventTriangleAPI.Consumer.Application/EventTriangleAPI.Consumer.Application.csproj +++ b/src/consumer/EventTriangleAPI.Consumer.Application/EventTriangleAPI.Consumer.Application.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 diff --git a/src/consumer/EventTriangleAPI.Consumer.BusinessLogic/EventTriangleAPI.Consumer.BusinessLogic.csproj b/src/consumer/EventTriangleAPI.Consumer.BusinessLogic/EventTriangleAPI.Consumer.BusinessLogic.csproj index 14a5c59a..37296380 100644 --- a/src/consumer/EventTriangleAPI.Consumer.BusinessLogic/EventTriangleAPI.Consumer.BusinessLogic.csproj +++ b/src/consumer/EventTriangleAPI.Consumer.BusinessLogic/EventTriangleAPI.Consumer.BusinessLogic.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 diff --git a/src/consumer/EventTriangleAPI.Consumer.Domain/EventTriangleAPI.Consumer.Domain.csproj b/src/consumer/EventTriangleAPI.Consumer.Domain/EventTriangleAPI.Consumer.Domain.csproj index 8afc1950..42e2a2df 100644 --- a/src/consumer/EventTriangleAPI.Consumer.Domain/EventTriangleAPI.Consumer.Domain.csproj +++ b/src/consumer/EventTriangleAPI.Consumer.Domain/EventTriangleAPI.Consumer.Domain.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 diff --git a/src/consumer/EventTriangleAPI.Consumer.IntegrationTests/EventTriangleAPI.Consumer.IntegrationTests.csproj b/src/consumer/EventTriangleAPI.Consumer.IntegrationTests/EventTriangleAPI.Consumer.IntegrationTests.csproj index 74d5c61d..8bac95ee 100644 --- a/src/consumer/EventTriangleAPI.Consumer.IntegrationTests/EventTriangleAPI.Consumer.IntegrationTests.csproj +++ b/src/consumer/EventTriangleAPI.Consumer.IntegrationTests/EventTriangleAPI.Consumer.IntegrationTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 @@ -9,13 +9,13 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/consumer/EventTriangleAPI.Consumer.Persistence/EventTriangleAPI.Consumer.Persistence.csproj b/src/consumer/EventTriangleAPI.Consumer.Persistence/EventTriangleAPI.Consumer.Persistence.csproj index fc84c2eb..00f4cce6 100644 --- a/src/consumer/EventTriangleAPI.Consumer.Persistence/EventTriangleAPI.Consumer.Persistence.csproj +++ b/src/consumer/EventTriangleAPI.Consumer.Persistence/EventTriangleAPI.Consumer.Persistence.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 disable diff --git a/src/consumer/EventTriangleAPI.Consumer.Presentation/DependencyInjection/SwaggerServices.cs b/src/consumer/EventTriangleAPI.Consumer.Presentation/DependencyInjection/SwaggerServices.cs index 492e7c5e..f5ca2d99 100644 --- a/src/consumer/EventTriangleAPI.Consumer.Presentation/DependencyInjection/SwaggerServices.cs +++ b/src/consumer/EventTriangleAPI.Consumer.Presentation/DependencyInjection/SwaggerServices.cs @@ -1,6 +1,6 @@ using System.Reflection; using Microsoft.Net.Http.Headers; -using Microsoft.OpenApi.Models; +using Microsoft.OpenApi; namespace EventTriangleAPI.Consumer.Presentation.DependencyInjection; @@ -31,24 +31,24 @@ public static IServiceCollection AddSwagger(this IServiceCollection serviceColle } ); - c.AddSecurityRequirement( - new OpenApiSecurityRequirement - { - { - new OpenApiSecurityScheme - { - Reference = new OpenApiReference - { - Type = ReferenceType.SecurityScheme, - Id = "token" - }, - }, - Array.Empty() - } - } - ); + //c.AddSecurityRequirement( + // new OpenApiSecurityRequirement + // { + // { + // new OpenApiSecurityScheme + // { + // Reference = new OpenApiReference + // { + // Type = ReferenceType.SecurityScheme, + // Id = "token" + // }, + // }, + // Array.Empty() + // } + // } + //); }); return serviceCollection; } -} \ No newline at end of file +} diff --git a/src/consumer/EventTriangleAPI.Consumer.Presentation/EventTriangleAPI.Consumer.Presentation.csproj b/src/consumer/EventTriangleAPI.Consumer.Presentation/EventTriangleAPI.Consumer.Presentation.csproj index 46d38c21..dbe5d7c0 100644 --- a/src/consumer/EventTriangleAPI.Consumer.Presentation/EventTriangleAPI.Consumer.Presentation.csproj +++ b/src/consumer/EventTriangleAPI.Consumer.Presentation/EventTriangleAPI.Consumer.Presentation.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 diff --git a/src/consumer/EventTriangleAPI.Consumer.Presentation/Program.cs b/src/consumer/EventTriangleAPI.Consumer.Presentation/Program.cs index d05fea05..c0efab86 100644 --- a/src/consumer/EventTriangleAPI.Consumer.Presentation/Program.cs +++ b/src/consumer/EventTriangleAPI.Consumer.Presentation/Program.cs @@ -22,6 +22,7 @@ { o.Conventions.Add(new RouteTokenTransformerConvention(new CustomParameterTransformer())); }); + builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwagger(); builder.Services.AddSignalR(); @@ -88,7 +89,7 @@ app.UseSwagger(); app.UseSwaggerUI(); -app.UseHttpsRedirection(); +//app.UseHttpsRedirection(); app.UseRouting(); @@ -105,4 +106,4 @@ await app.InitializeSeeds(); } -app.Run(); \ No newline at end of file +app.Run(); diff --git a/src/consumer/EventTriangleAPI.Consumer.UnitTests/EventTriangleAPI.Consumer.UnitTests.csproj b/src/consumer/EventTriangleAPI.Consumer.UnitTests/EventTriangleAPI.Consumer.UnitTests.csproj index 32045a72..ec0e02f5 100644 --- a/src/consumer/EventTriangleAPI.Consumer.UnitTests/EventTriangleAPI.Consumer.UnitTests.csproj +++ b/src/consumer/EventTriangleAPI.Consumer.UnitTests/EventTriangleAPI.Consumer.UnitTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 @@ -9,13 +9,13 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/sender/Dockerfile b/src/sender/Dockerfile index 73655845..f483175b 100644 --- a/src/sender/Dockerfile +++ b/src/sender/Dockerfile @@ -1,9 +1,9 @@ -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base WORKDIR /app -EXPOSE 80 -EXPOSE 81 +EXPOSE 8080 +EXPOSE 8081 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS publish WORKDIR /src COPY ["sender/EventTriangleAPI.Sender.Application/EventTriangleAPI.Sender.Application.csproj", "sender/EventTriangleAPI.Sender.Application/"] COPY ["sender/EventTriangleAPI.Sender.BusinessLogic/EventTriangleAPI.Sender.BusinessLogic.csproj", "sender/EventTriangleAPI.Sender.BusinessLogic/"] @@ -22,4 +22,4 @@ RUN dotnet publish "EventTriangleAPI.Sender.Presentation.csproj" -c Release -p:V FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "EventTriangleAPI.Sender.Presentation.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "EventTriangleAPI.Sender.Presentation.dll"] diff --git a/src/sender/EventTriangleAPI.Sender.Application/EventTriangleAPI.Sender.Application.csproj b/src/sender/EventTriangleAPI.Sender.Application/EventTriangleAPI.Sender.Application.csproj index 16b3d65a..70280869 100644 --- a/src/sender/EventTriangleAPI.Sender.Application/EventTriangleAPI.Sender.Application.csproj +++ b/src/sender/EventTriangleAPI.Sender.Application/EventTriangleAPI.Sender.Application.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 diff --git a/src/sender/EventTriangleAPI.Sender.BusinessLogic/EventTriangleAPI.Sender.BusinessLogic.csproj b/src/sender/EventTriangleAPI.Sender.BusinessLogic/EventTriangleAPI.Sender.BusinessLogic.csproj index d857e788..9458a31d 100644 --- a/src/sender/EventTriangleAPI.Sender.BusinessLogic/EventTriangleAPI.Sender.BusinessLogic.csproj +++ b/src/sender/EventTriangleAPI.Sender.BusinessLogic/EventTriangleAPI.Sender.BusinessLogic.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 diff --git a/src/sender/EventTriangleAPI.Sender.Domain/EventTriangleAPI.Sender.Domain.csproj b/src/sender/EventTriangleAPI.Sender.Domain/EventTriangleAPI.Sender.Domain.csproj index 8afc1950..42e2a2df 100644 --- a/src/sender/EventTriangleAPI.Sender.Domain/EventTriangleAPI.Sender.Domain.csproj +++ b/src/sender/EventTriangleAPI.Sender.Domain/EventTriangleAPI.Sender.Domain.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 diff --git a/src/sender/EventTriangleAPI.Sender.IntegrationTests/EventTriangleAPI.Sender.IntegrationTests.csproj b/src/sender/EventTriangleAPI.Sender.IntegrationTests/EventTriangleAPI.Sender.IntegrationTests.csproj index b6249873..b83020fb 100644 --- a/src/sender/EventTriangleAPI.Sender.IntegrationTests/EventTriangleAPI.Sender.IntegrationTests.csproj +++ b/src/sender/EventTriangleAPI.Sender.IntegrationTests/EventTriangleAPI.Sender.IntegrationTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 @@ -9,13 +9,13 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/sender/EventTriangleAPI.Sender.Persistence/EventTriangleAPI.Sender.Persistence.csproj b/src/sender/EventTriangleAPI.Sender.Persistence/EventTriangleAPI.Sender.Persistence.csproj index f2cc0757..271c6640 100644 --- a/src/sender/EventTriangleAPI.Sender.Persistence/EventTriangleAPI.Sender.Persistence.csproj +++ b/src/sender/EventTriangleAPI.Sender.Persistence/EventTriangleAPI.Sender.Persistence.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 disable diff --git a/src/sender/EventTriangleAPI.Sender.Presentation/DependencyInjection/SwaggerServices.cs b/src/sender/EventTriangleAPI.Sender.Presentation/DependencyInjection/SwaggerServices.cs index c634603b..da55a3cd 100644 --- a/src/sender/EventTriangleAPI.Sender.Presentation/DependencyInjection/SwaggerServices.cs +++ b/src/sender/EventTriangleAPI.Sender.Presentation/DependencyInjection/SwaggerServices.cs @@ -1,6 +1,6 @@ using System.Reflection; using Microsoft.Net.Http.Headers; -using Microsoft.OpenApi.Models; +using Microsoft.OpenApi; namespace EventTriangleAPI.Sender.Presentation.DependencyInjection; @@ -31,24 +31,24 @@ public static IServiceCollection AddSwagger(this IServiceCollection serviceColle } ); - c.AddSecurityRequirement( - new OpenApiSecurityRequirement - { - { - new OpenApiSecurityScheme - { - Reference = new OpenApiReference - { - Type = ReferenceType.SecurityScheme, - Id = "token" - }, - }, - Array.Empty() - } - } - ); + //c.AddSecurityRequirement( + // new OpenApiSecurityRequirement + // { + // { + // new OpenApiSecurityScheme + // { + // Reference = new OpenApiReference + // { + // Type = ReferenceType.SecurityScheme, + // Id = "token" + // }, + // }, + // Array.Empty() + // } + // } + //); }); return serviceCollection; } -} \ No newline at end of file +} diff --git a/src/sender/EventTriangleAPI.Sender.Presentation/EventTriangleAPI.Sender.Presentation.csproj b/src/sender/EventTriangleAPI.Sender.Presentation/EventTriangleAPI.Sender.Presentation.csproj index 93fb9325..061ebcb5 100644 --- a/src/sender/EventTriangleAPI.Sender.Presentation/EventTriangleAPI.Sender.Presentation.csproj +++ b/src/sender/EventTriangleAPI.Sender.Presentation/EventTriangleAPI.Sender.Presentation.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 diff --git a/src/sender/EventTriangleAPI.Sender.Presentation/Program.cs b/src/sender/EventTriangleAPI.Sender.Presentation/Program.cs index 4883213c..d2765474 100644 --- a/src/sender/EventTriangleAPI.Sender.Presentation/Program.cs +++ b/src/sender/EventTriangleAPI.Sender.Presentation/Program.cs @@ -15,14 +15,11 @@ var builder = WebApplication.CreateBuilder(args); -if (builder.Environment.EnvironmentName == "Docker") +builder.WebHost.ConfigureKestrel(options => { - builder.WebHost.ConfigureKestrel(options => - { - options.ListenAnyIP(80, listenOptions => listenOptions.Protocols = HttpProtocols.Http1); - options.ListenAnyIP(81, listenOptions => listenOptions.Protocols = HttpProtocols.Http2); - }); -} + options.ListenAnyIP(8080, listenOptions => listenOptions.Protocols = HttpProtocols.Http1); // for HTTP/1.1 + options.ListenAnyIP(8081, listenOptions => listenOptions.Protocols = HttpProtocols.Http2); // for GRPC HTTP/2 +}); var configurationSection = builder.Configuration.GetSection(AppSettingsConstants.AzureAd); var databaseConnectionString = builder.Configuration[AppSettingsConstants.DatabaseConnectionString]; @@ -71,7 +68,7 @@ app.UseSwagger(); app.UseSwaggerUI(); -app.UseHttpsRedirection(); +//app.UseHttpsRedirection(); app.UseRouting(); diff --git a/src/sender/EventTriangleAPI.Sender.UnitTests/EventTriangleAPI.Sender.UnitTests.csproj b/src/sender/EventTriangleAPI.Sender.UnitTests/EventTriangleAPI.Sender.UnitTests.csproj index 4a21848a..1ed80f47 100644 --- a/src/sender/EventTriangleAPI.Sender.UnitTests/EventTriangleAPI.Sender.UnitTests.csproj +++ b/src/sender/EventTriangleAPI.Sender.UnitTests/EventTriangleAPI.Sender.UnitTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12 @@ -9,13 +9,13 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/shared/EventTriangleAPI.Shared.Application/EventTriangleAPI.Shared.Application.csproj b/src/shared/EventTriangleAPI.Shared.Application/EventTriangleAPI.Shared.Application.csproj index 0367a789..3340ff82 100644 --- a/src/shared/EventTriangleAPI.Shared.Application/EventTriangleAPI.Shared.Application.csproj +++ b/src/shared/EventTriangleAPI.Shared.Application/EventTriangleAPI.Shared.Application.csproj @@ -1,45 +1,45 @@ - net8.0 + net10.0 enable 12 - - - - - - + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - + + + + + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + - + diff --git a/src/shared/EventTriangleAPI.Shared.DTO/EventTriangleAPI.Shared.DTO.csproj b/src/shared/EventTriangleAPI.Shared.DTO/EventTriangleAPI.Shared.DTO.csproj index 6b816205..483f8028 100644 --- a/src/shared/EventTriangleAPI.Shared.DTO/EventTriangleAPI.Shared.DTO.csproj +++ b/src/shared/EventTriangleAPI.Shared.DTO/EventTriangleAPI.Shared.DTO.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable 12