Hi,
Order should not matter here.I tried with above docker-compose & its working fine.
Could you please try adding the below variable in the environment and creating a container?
PGADMIN_CONFIG_CONSOLE_LOG_LEVEL: 10
And check if logs shows -
2023-05-17 16:06:15 pgAdmin 4 - Application Initialisation
2023-05-17 16:06:15 ======================================
2023-05-17 16:06:15
2023-05-17 16:06:24 ----------
2023-05-17 16:06:24 Loading servers with:
2023-05-17 16:06:24 User: *****@***.com
2023-05-17 16:06:24 SQLite pgAdmin config: /var/lib/pgadmin/pgadmin4.db
2023-05-17 16:06:24 ----------
2023-05-17 16:06:24 Added 1 Server Group(s) and 7 Server(s).
Also can you please check if the source file path for servers.json is correct? If the source file path is incorrect, servers will not be loaded.
Thanks,Yogesh Mahajan
EnterpriseDB
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.