79627358

Date: 2025-05-18 10:36:35
Score: 1
Natty:
Report link

Volumes don't work with postgres on ACA. You should use a hosted database management system:

var builder = DistributedApplication.CreateBuilder(args);

var postgres = builder.AddAzurePostgresFlexibleServer("postgres")
    .RunAsContainer();
var postgresdb = postgres.AddDatabase("postgresdb");

var exampleProject = builder.AddProject<Projects.ExampleProject>()
                            .WithReference(postgresdb);

For more information: https://learn.microsoft.com/en-us/dotnet/aspire/database/azure-postgresql-entity-framework-integration?tabs=dotnet-cli
Related issue in dotnet/aspire repo: https://learn.microsoft.com/en-us/dotnet/aspire/database/azure-postgresql-entity-framework-integration?tabs=dotnet-cli

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Alirexaa