# \[Erro\] could not translate host name "postgres" to addresa

**URL:** <https://forum.ieducar.org/t/erro-could-not-translate-host-name-postgres-to-addresa/521>\
**Category:** Sem categoria\
**Created:** [Abril 15, 2019, 4:18am UTC](https://forum.ieducar.org/t/erro-could-not-translate-host-name-postgres-to-addresa/521 "2019-04-15T04:18:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukaslima3](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@lukaslima3](https://forum.ieducar.org/u/lukaslima3)\
**Post date:** [Abril 15, 2019, 4:18am UTC](https://forum.ieducar.org/t/erro-could-not-translate-host-name-postgres-to-addresa/521/1 "2019-04-15T04:18:01Z")

</div>

Boa noite estou com o erro abaixo:

Doctrine\DBAL\Driver\PDOException::(“SQLSTATE[08006] [7] could not translate host name “postgres” to address: Name or service not known”)

O erro ocorre após rodar o comando “docker-compose exec php composer new-install”

o meu .env segue…

APP\_NAME=i-Educar  
APP\_ENV=local  
APP\_KEY=base64:DLiTsZSNpLMg2fh+dcsnNHNaAmr+phDOyLYHyMwABas=  
APP\_DEBUG=true  
APP\_URL=http://localhost  
APP\_TIMEZONE=America/Sao\_Paulo  
APP\_TRACK\_ERROR=false  
APP\_DEFAULT\_HOST=ieducar.com.br

API\_ACCESS\_KEY=  
API\_SECRET\_KEY=

CORE\_EXT\_CONFIGURATION\_ENV="${APP\_ENV}"

LEGACY\_CODE=true  
LEGACY\_DISPLAY\_ERRORS=false  
LEGACY\_PATH=ieducar

LOG\_CHANNEL=stack

TELESCOPE\_ENABLED=false

DB\_CONNECTION=pgsql  
DB\_HOST=postgres  
DB\_PORT=5432  
DB\_DATABASE=ieducar  
DB\_USERNAME=ieducar  
DB\_PASSWORD=ieducar

BROADCAST\_DRIVER=log  
CACHE\_DRIVER=file  
QUEUE\_CONNECTION=sync  
SESSION\_DRIVER=file  
SESSION\_LIFETIME=120

REDIS\_HOST=redis  
REDIS\_PASSWORD=null  
REDIS\_PORT=6379

MAIL\_DRIVER=smtp  
MAIL\_HOST=[smtp.mailtrap.io](http://smtp.mailtrap.io)  
MAIL\_PORT=2525  
MAIL\_USERNAME=null  
MAIL\_PASSWORD=null  
MAIL\_ENCRYPTION=null

PUSHER\_APP\_ID=  
PUSHER\_APP\_KEY=  
PUSHER\_APP\_SECRET=  
PUSHER\_APP\_CLUSTER=mt1

MIX\_PUSHER\_APP\_KEY="{PUSHER\_APP\_KEY}" MIX\_PUSHER\_APP\_CLUSTER="{PUSHER\_APP\_CLUSTER}"

HONEYBADGER\_API\_KEY=
