Excontainers.PostgresContainer (excontainers v0.3.1) View Source

Functions to build and interact with PostgreSql containers.

Link to this section Summary

Functions

Returns the connection parameters to connect to the database from the host machine.

Builds a PostgreSql container.

Returns the port on the host machine where the MySql container is listening.

Link to this section Functions

Link to this function

connection_parameters(pid)

View Source

Returns the connection parameters to connect to the database from the host machine.

Link to this function

new(image \\ "postgres:13.1", opts \\ [])

View Source

Builds a PostgreSql container.

Uses PostgreSql 13.1 by default, but a custom image can also be set.

Options

  • username sets the username for the user
  • password sets the password for the user
  • database sets the name of the database

Returns the port on the host machine where the MySql container is listening.