I've done a docker-compose up and been able to run my web service attached to a postgresql image. Problem is, I can't view the data on postico when I try to access the database. The name of the image is db and when i try to specify hostname to be "db" on postico before i connect, i get an error saying hostname not found. I've entered my credentials, port and database name the same way i keyed them in my docker-compose file.
You can't use the hostname db outside the internal docker network. That would work in the applications running in the same network.Since you exposed the db to run on port 5432, it's exposed via 0.0.0.0:5432->5432/tcp and therefore is accessible with localhost as host and port 5432
PostgreSQL is one of the fast growing object-relational database management system (ORDBMS). This tutorial helps you install PostgreSQL on your macOS and helps you configure a user & database for your first application using PostgreSQL.
Though you can run the SQL queries using plql utility, it will become extremely hard to use that once you have a good amount of data and tables in your database. That's where GUI tools come to help you. postico ( ) is one among them. It's a very good looking GUI option for PostgreSQL.
Following screen shots shows you how to connect to the database using postico and how to create tables and play with the data