Using pgadmin in docker via compose - Mailing list pgsql-admin

From Tim Uckun
Subject Using pgadmin in docker via compose
Date
Msg-id CAGuHJrM=dnQ4rjwd2EWTvSDZThfqgqdDRrd1yXJtebMi-z+40A@mail.gmail.com
Whole thread Raw
List pgsql-admin
Hi.

I want to set up pgadmin in a docker compose and have it automatically
be able to connect to the database running in the same compose file.

I have set up the following entry in the compose file (excuse the indents)

pgadmin:
image: dpage/pgadmin4:latest
volumes:
- ./pgadmin_servers.json:/pgadmin4/servers.json
- ./pgpass:/pgadmin4/.pgpass:ro
ports:
- 5050:5050
environment:
PGADMIN_DEFAULT_EMAIL: timuckun@gmail.com
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_LISTEN_PORT: 5050
PGADMIN_SERVER_JSON_FILE: /pgadmin4/servers.json

This is the servers file

{
"Servers": {
"1": {
"Name": "Minimally Defined Server",
"Group": "Server Group 1",
"Port": 5432,
"Username": "benchmarkdbuser",
"Host": "tfb-database",
"SSLMode": "prefer",
"MaintenanceDB": "hello_world",
"PassFile": "/pgadmin4/.pgpass"
}
}
}

This launched the pgadmin app but the server doesn't show up in the list.

I am wondering what I need to do in order to make this happen. Ideally
the app would also log in as admin and go right to the startup screen.

Thanks.



pgsql-admin by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: ERROR: could not serialize access due to concurrent update
Next
From: Murthy Nunna
Date:
Subject: Vacuum Tuning Question