From c89a0958f87a051c0524bf0f7a662bcf9e5cf946 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 23 Dec 2023 13:01:38 +0100 Subject: [PATCH] feat: fix todo Signed-off-by: kjuulh --- src/backend/server/Dockerfile | 2 +- src/backend/server/global.json | 4 ++-- src/backend/server/src/Todo.Api/Todo.Api.csproj | 2 +- src/backend/server/src/Todo.Core/DependencyInjection.cs | 4 ++-- src/backend/server/src/Todo.Core/Todo.Core.csproj | 3 +-- .../server/src/Todo.Infrastructure/DependencyInjection.cs | 2 +- .../server/src/Todo.Infrastructure/Todo.Infrastructure.csproj | 2 +- .../server/src/Todo.Persistence/Todo.Persistence.csproj | 2 +- src/docker-compose.yml | 2 ++ 9 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/backend/server/Dockerfile b/src/backend/server/Dockerfile index 0ef9e45..5fa65b8 100644 --- a/src/backend/server/Dockerfile +++ b/src/backend/server/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 diff --git a/src/backend/server/global.json b/src/backend/server/global.json index f443bd4..03c8fa0 100644 --- a/src/backend/server/global.json +++ b/src/backend/server/global.json @@ -1,7 +1,7 @@ { "sdk": { - "version": "6.0", + "version": "8.0", "rollForward": "latestMajor", "allowPrerelease": true } -} \ No newline at end of file +} diff --git a/src/backend/server/src/Todo.Api/Todo.Api.csproj b/src/backend/server/src/Todo.Api/Todo.Api.csproj index 26dce37..ffb6cbb 100644 --- a/src/backend/server/src/Todo.Api/Todo.Api.csproj +++ b/src/backend/server/src/Todo.Api/Todo.Api.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 Linux enable diff --git a/src/backend/server/src/Todo.Core/DependencyInjection.cs b/src/backend/server/src/Todo.Core/DependencyInjection.cs index 5bf4359..3fc5113 100644 --- a/src/backend/server/src/Todo.Core/DependencyInjection.cs +++ b/src/backend/server/src/Todo.Core/DependencyInjection.cs @@ -11,5 +11,5 @@ namespace Todo.Core; public static class DependencyInjection { public static IServiceCollection AddCore(this IServiceCollection services) - => services.AddMediatR(Assembly.GetExecutingAssembly()); -} \ No newline at end of file + => services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(Assembly.GetExecutingAssembly())); +} diff --git a/src/backend/server/src/Todo.Core/Todo.Core.csproj b/src/backend/server/src/Todo.Core/Todo.Core.csproj index a02eecc..d1ef0eb 100644 --- a/src/backend/server/src/Todo.Core/Todo.Core.csproj +++ b/src/backend/server/src/Todo.Core/Todo.Core.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable @@ -15,7 +15,6 @@ - diff --git a/src/backend/server/src/Todo.Infrastructure/DependencyInjection.cs b/src/backend/server/src/Todo.Infrastructure/DependencyInjection.cs index 4a55689..3f290e5 100644 --- a/src/backend/server/src/Todo.Infrastructure/DependencyInjection.cs +++ b/src/backend/server/src/Todo.Infrastructure/DependencyInjection.cs @@ -66,4 +66,4 @@ public class GiteaAuthOptions [Required] public string ClientSecret { get; init; } -} \ No newline at end of file +} diff --git a/src/backend/server/src/Todo.Infrastructure/Todo.Infrastructure.csproj b/src/backend/server/src/Todo.Infrastructure/Todo.Infrastructure.csproj index 4d309e5..8e11a5e 100644 --- a/src/backend/server/src/Todo.Infrastructure/Todo.Infrastructure.csproj +++ b/src/backend/server/src/Todo.Infrastructure/Todo.Infrastructure.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable enable diff --git a/src/backend/server/src/Todo.Persistence/Todo.Persistence.csproj b/src/backend/server/src/Todo.Persistence/Todo.Persistence.csproj index d6cbfc3..c10a0c0 100644 --- a/src/backend/server/src/Todo.Persistence/Todo.Persistence.csproj +++ b/src/backend/server/src/Todo.Persistence/Todo.Persistence.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable diff --git a/src/docker-compose.yml b/src/docker-compose.yml index 573ca06..52b20bf 100644 --- a/src/docker-compose.yml +++ b/src/docker-compose.yml @@ -21,6 +21,8 @@ services: MONGODB__Host: db MONGODB__Port: 27017 MONGODB__Database: todo + env_file: + - .env depends_on: - db