✅ How come my containerized postgres+pgadmin won't let me connect to db from pgadmin?
Hi there, I've made a small docker compose file that should start up a simple db with pgadmin. But I am unable to connect from pgadmin, here's the file:
So in pgadmin I try connecting like the atttached snippet. Any ideas where I go wrong?
9 Replies
localhost
is wrong, the containers see each other via their container name as hostname, so in this case it should be db
for the host address in pgadminOh thank you - this clearly is something I should understand. Is that because you see the listing
db
under services?yes, thats what i tried to explain with the middle part ;p
Ah thats what you meant with container name, ok
thanks 🙂
i guess since u use docker compose this will be also of good information for ya:
https://docs.docker.com/compose/how-tos/networking/
Thanks, this is helpful 🙂
if ur questions are answered please dont forget to $close the thread
If you have no further questions, please use /close to mark the forum thread as answered