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

  1. In the container, but yes. It is important to know the difference. ou can have data in the container which was not in the image (template)

  2. Again, container.

  3. It doesn’t make sense. I thought I mentioned it somewhere that it should be a path, not a command, but let’s not dive into the details here. To the rest of this question, yes.

  4. Well, I indeed hope we will not cover every topic not even related to Docker here, but this is database specific and I am not a postgres user to give you a precise answer so again, I used Google to search for “postgresql maintenance db”: postgresql - What is the Maintenance DB asked by pgAdmin? - Database Administrators Stack Exchange

    Probably because you inicialized the database with the access rights set to the postgres db, but as I wrote, I don’t use postgres frequently.

We can help you with Docker related issues but you should use other forums as well.

Please, share what you have read next time so we can focus on that and not trying to search for you the same again.

1 Like