Aspire.Hosting.PostgreSQL
Official
📦 Aspire.Hosting.PostgreSQLv17.0.0Import path
apphost/modules/aspire15Functions
5Types
5 types, 15 functions and 17 members
Handles
Functions
DistributedApplicationBuilder
PgAdminContainerResource
PgWebContainerResource
PostgresDatabaseResource
method
WithCreationScriptbuilderDefines the SQL script used to create the database.
WithCreationScript(script string) PostgresDatabaseResourcemethod
WithPostgresMcpbuilderAdds a Postgres MCP server container and configures it to connect to the database represented by
builder.WithPostgresMcp(options ...*WithPostgresMcpOptions) PostgresDatabaseResourcePostgresServerResource
method
AddDatabasebuilderAdds a PostgreSQL database to the application model.
AddDatabase(name string, options ...*AddDatabaseOptions) PostgresDatabaseResourcemethod
WithDataBindMountbuilderAdds a bind mount for the data folder to a PostgreSQL container resource.
WithDataBindMount(source string, options ...*WithDataBindMountOptions) PostgresServerResourcemethod
WithDataVolumebuilderAdds a named volume for the data folder to a PostgreSQL container resource.
WithDataVolume(options ...*WithDataVolumeOptions) PostgresServerResourcemethod
WithHostPortbuilderConfigures the host port that the PostgreSQL resource is exposed on instead of using randomly assigned port.
WithHostPort(port *float64) PostgresServerResourcemethod
WithInitFilesbuilderCopies init files to a PostgreSQL container resource.
WithInitFiles(source string) PostgresServerResourcemethod
WithPasswordbuilderConfigures the password that the PostgreSQL resource is used.
WithPassword(password ParameterResource) PostgresServerResourcemethod
WithPgAdminbuilderAdds a pgAdmin 4 administration and development platform for PostgreSQL to the application model.
WithPgAdmin(options ...*WithPgAdminOptions) PostgresServerResourcemethod
WithPgWebbuilderAdds an administration and development platform for PostgreSQL to the application model using pgweb.
WithPgWeb(options ...*WithPgWebOptions) PostgresServerResourcemethod
WithReplbuilderAdds a REPL command that opens an authenticated PostgreSQL shell in the dashboard terminal dock.
WithRepl() PostgresServerResourcemethod
WithUserNamebuilderConfigures the user name that the PostgreSQL resource is used.
WithUserName(userName ParameterResource) PostgresServerResource