diff --git a/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs b/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs index ccdbd30..5f05e9e 100644 --- a/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs +++ b/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs @@ -18,6 +18,8 @@ public static class DependencyInjectionExtensions /// public static void AddApiServices(this IHostApplicationBuilder builder) { + builder.AddBuilderServices(); + builder.Services .AddMiscellaneousServices() .AddCustomOpenApi() @@ -27,6 +29,13 @@ public static class DependencyInjectionExtensions builder.AddDbContext(); } + private static IHostApplicationBuilder AddBuilderServices(this IHostApplicationBuilder builder) + { + builder.AddSeqEndpoint("seq"); + + return builder; + } + private static IServiceCollection AddMiscellaneousServices(this IServiceCollection services) { services.AddSingleton(() => diff --git a/src/Vegasco.Server.Api/Vegasco.Server.Api.csproj b/src/Vegasco.Server.Api/Vegasco.Server.Api.csproj index 86548ed..461fc82 100644 --- a/src/Vegasco.Server.Api/Vegasco.Server.Api.csproj +++ b/src/Vegasco.Server.Api/Vegasco.Server.Api.csproj @@ -14,6 +14,7 @@ + diff --git a/src/Vegasco.Server.AppHost/Program.cs b/src/Vegasco.Server.AppHost/Program.cs index f3ea64e..81a12e7 100644 --- a/src/Vegasco.Server.AppHost/Program.cs +++ b/src/Vegasco.Server.AppHost/Program.cs @@ -14,13 +14,21 @@ if (builder.Environment.IsDevelopment()) .WithPgAdmin(); } +IResourceBuilder seq = builder.AddSeq("seq") + .WithLifetime(ContainerLifetime.Persistent) + .WithDataVolume() + .WithExternalHttpEndpoints() + .WithImageTag("latest"); + IResourceBuilder postgres = postgresBuilder .AddDatabase(Constants.Database.Name); IResourceBuilder api = builder .AddProject(Constants.Projects.Api) .WithReference(postgres) - .WaitFor(postgres); + .WaitFor(postgres) + .WithReference(seq) + .WaitFor(seq); builder .AddNpmApp("Vegasco-Web", "../Vegasco-Web") diff --git a/src/Vegasco.Server.AppHost/Vegasco.Server.AppHost.csproj b/src/Vegasco.Server.AppHost/Vegasco.Server.AppHost.csproj index 783a0d3..6f4dfb9 100644 --- a/src/Vegasco.Server.AppHost/Vegasco.Server.AppHost.csproj +++ b/src/Vegasco.Server.AppHost/Vegasco.Server.AppHost.csproj @@ -18,6 +18,7 @@ 3.7.115 +