From b28bd2826be4aa10cc8dd07de265e62d1aec14d6 Mon Sep 17 00:00:00 2001 From: ThompsonNye Date: Thu, 12 Jun 2025 19:12:26 +0200 Subject: [PATCH] Keep db container after apps shutdown --- src/Vegasco.Server.AppHost/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Vegasco.Server.AppHost/Program.cs b/src/Vegasco.Server.AppHost/Program.cs index 476f8c4..5d592bc 100644 --- a/src/Vegasco.Server.AppHost/Program.cs +++ b/src/Vegasco.Server.AppHost/Program.cs @@ -3,6 +3,7 @@ using Vegasco.Server.AppHost.Shared; IDistributedApplicationBuilder builder = DistributedApplication.CreateBuilder(args); IResourceBuilder postgres = builder.AddPostgres(Constants.Database.ServiceName) + .WithLifetime(ContainerLifetime.Persistent) .WithDataVolume() .AddDatabase(Constants.Database.Name);