DEV Community

Discussion on: Postgres up and running in less than 3 minutes with docker-compose 🚀

Collapse
 
kotrotko profile image
kotrotko • Edited

Thank you so much, it is very useful for newbies like me) At the same time, if I try

psql --host=db --username=dbuser --dbname=todoapp

, I get

psql: error: could not translate host name "db" to address: nodename nor servname provided, or not known

. Other commands work as expected. What does it mean and how to fix it?

Collapse
 
nsmorisset profile image
nsmorisset

Hi,
For me it's ok with:
psql --host=database --username=dbuser --dbname=todoapp
but I do not know why