An Aspire integration for extending postgres hosting.
$ dotnet add package CommunityToolkit.Aspire.Hosting.PostgreSQL.ExtensionsThis integration contains extensions for the PostgreSQL hosting package for Aspire.
The integration provides support for running:
In your AppHost project, install the package using the following command:
dotnet add package CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions
In the Program.cs file of AppHost, define an Postgres resource, then call AddPostgres:
var postgres = builder.AddPostgres("postgres")
.WithDbGate()
.WithAdminer();
In the AppHost file, define a Flyway resource and link it to a Postgres database resource:
var flyway = builder.AddFlyway("flyway", "./migrations");
var postgres = builder.AddPostgres("postgres");
var database = postgres.AddDatabase("database").WithFlywayMigration(flyway);
flyway.WaitFor(database);
https://aspire.dev/integrations/databases/postgres/postgresql-extensions/