Aspire.Hosting.PostgreSQL
Official
📦 Aspire.Hosting.PostgreSQL v13.4.0 14 Functions
5 Types
5 types and 17 members
Types
Functions
method
addDatabase builder Adds a PostgreSQL database to the application model.
addDatabase(name: string, databaseName?: string): PostgresDatabaseResource method
addPostgres builder Adds a PostgreSQL resource to the application model. A container is used for local development.
addPostgres(name: string, userName?: ParameterResource, password?: ParameterResource, port?: number): PostgresServerResource method
withCreationScript builder Defines the SQL script used to create the database.
withCreationScript(script: string): PostgresDatabaseResource method
withDataBindMount builder Adds a bind mount for the data folder to a PostgreSQL container resource.
withDataBindMount(source: string, isReadOnly?: boolean): PostgresServerResource method
withDataVolume builder Adds a named volume for the data folder to a PostgreSQL container resource.
withDataVolume(name?: string, isReadOnly?: boolean): PostgresServerResource method
withHostPort builder Configures the host port that the PGAdmin resource is exposed on instead of using randomly assigned port.
withHostPort(port: number): PgAdminContainerResource method
withHostPort builder Configures the host port that the pgweb resource is exposed on instead of using randomly assigned port.
withHostPort(port: number): PgWebContainerResource method
withHostPort builder Configures the host port that the PostgreSQL resource is exposed on instead of using randomly assigned port.
withHostPort(port: number): PostgresServerResource method
withInitFiles builder Copies init files to a PostgreSQL container resource.
withInitFiles(source: string): PostgresServerResource method
withPassword builder Configures the password that the PostgreSQL resource is used.
withPassword(password: ParameterResource): PostgresServerResource method
withPgAdmin builder Adds a pgAdmin 4 administration and development platform for PostgreSQL to the application model.
withPgAdmin(configureContainer?: (obj: PgAdminContainerResource) => Promise<void>, containerName?: string): PostgresServerResource method
withPgWeb builder Adds an administration and development platform for PostgreSQL to the application model using pgweb.
withPgWeb(configureContainer?: (obj: PgWebContainerResource) => Promise<void>, containerName?: string): PostgresServerResource method
withPostgresMcp builder Adds a Postgres MCP server container and configures it to connect to the database represented by `builder`.
withPostgresMcp(configureContainer?: (obj: PostgresMcpContainerResource) => Promise<void>, containerName?: string): PostgresDatabaseResource method
withUserName builder Configures the user name that the PostgreSQL resource is used.
withUserName(userName: ParameterResource): PostgresServerResource