Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.38 KB

File metadata and controls

49 lines (31 loc) · 1.38 KB

CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions library

This integration contains extensions for the PostgreSQL hosting package for Aspire.

The integration provides support for running:

Getting Started

Install the package

In your AppHost project, install the package using the following command:

dotnet add package CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions

Example usage

Adminer and DbGate

In the Program.cs file of AppHost, define an Postgres resource, then call AddPostgres:

var postgres = builder.AddPostgres("postgres")
    .WithDbGate()
    .WithAdminer();

Flyway

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);

Additional Information

https://aspire.dev/integrations/databases/postgres/postgresql-extensions/

Feedback & contributing

https://github.com/CommunityToolkit/Aspire