Taking Advantage of the docker-compose Environment Variables
Automatically connect pgAdmin to a PostgreSQL volume on which there is a database and automatically load a schema present on a .sql file with Docker Compose - General Discussions - Docker Community Forums
How to create and connect to a Postgres container using docker-compose and . env files | by Anderson Loiola | Medium