tulik / symfony-4-docker-env

Docker Environment for Symfony. PHP-FPM, NGINX SSL Proxy, MySQL, LEMP
MIT License
118 stars 60 forks source link

An exception occurred in driver: SQLSTATE[08006] [7] could not translate host name "db" to address: Name does not resolve #13

Closed ruscon closed 6 years ago

ruscon commented 6 years ago
php            |  ! [NOTE] Some assets were installed via copy. If you make changes to these
php            |  !        assets you have to run this command again.
php            |
php            |  [OK] All assets were successfully installed.
php            |
php            |
php            | In AbstractPostgreSQLDriver.php line 93:
php            |
php            |   An exception occurred in driver: SQLSTATE[08006] [7] could not translate ho
php            |   st name "db" to address: Name does not resolve
php            |
php            |
php            | In PDOConnection.php line 50:
php            |
php            |   SQLSTATE[08006] [7] could not translate host name "db" to address: Name doe
php            |   s not resolve
php            |
php            |
php            | In PDOConnection.php line 46:
php            |
php            |   SQLSTATE[08006] [7] could not translate host name "db" to address: Name doe
php            |   s not resolve
php            |
php            |
php            | doctrine:schema:update [--complete] [--dump-sql] [-f|--force] [--em [EM]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>
php            |
php exited with code 1

have ideas how to fix it?

Mac os 10.12

tulik commented 6 years ago

It looks like a bug. In symfony .env should be #L13

DATABASE_URL=postgres://symfony:symfony@postgres/symfony

Can you make a PR?