Задать вопрос
@great_77

Можете дать пример настройки соединения в Symfony4 + Docker + Postgres?

An exception occurred in driver: SQLSTATE[08006] [7] could not connect to server: Connection refused
Is the server running on host "0.0.0.0" and accepting
TCP/IP connections on port 5432?


Ошибка
An exception occurred in driver: SQLSTATE[08006] [7] could not connect to server: Connection refused
	Is the server running on host "0.0.0.0" and accepting
	TCP/IP connections on port 5432?

  at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php:73
  at Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException('An exception occurred in driver: SQLSTATE[08006] [7] could not connect to server: Connection refused	Is the server running on host "0.0.0.0" and accepting	TCP/IP connections on port 5432?', object(PDOException))
     (/var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:166)
  at Doctrine\DBAL\DBALException::wrapException(object(Driver), object(PDOException), 'An exception occurred in driver: SQLSTATE[08006] [7] could not connect to server: Connection refused	Is the server running on host "0.0.0.0" and accepting	TCP/IP connections on port 5432?')
     (/var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:154)
  • Вопрос задан
  • 1406 просмотров
Подписаться 2 Простой Комментировать
Решения вопроса 1
@great_77 Автор вопроса
env(DATABASE_URL): 'postgres://root:123456@simpledocker_db_1/postgres' - container that we see when we use docker-compose ps
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы