mirror of
https://github.com/stan220/testcontainers-php.git
synced 2026-09-12 06:29:36 +00:00
fix: Tests and postgres image
This commit is contained in:
@@ -4,12 +4,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace Testcontainer\Container;
|
||||
|
||||
use Testcontainer\Wait\WaitForExec;
|
||||
|
||||
class PostgresContainer extends Container
|
||||
{
|
||||
private function __construct(string $version, string $rootPassword)
|
||||
{
|
||||
parent::__construct('mariadb:' . $version);
|
||||
parent::__construct('postgres:' . $version);
|
||||
$this->withEnvironment('POSTGRES_PASSWORD', $rootPassword);
|
||||
$this->withWait(new WaitForExec(["pg_isready", "-h", "127.0.0.1"]));
|
||||
}
|
||||
|
||||
public static function make(string $version = 'latest', string $mysqlRootPassword = 'root'): self
|
||||
|
||||
Reference in New Issue
Block a user