pgadmin4
pgadmin4 copied to clipboard
server is not listed in the admin UI by default docker-compose through environment variables
services:
postgres:
container_name: postgres
image: postgres:15.2-alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- "15432:5432"
restart: unless-stopped
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
restart: always
environment:
PGHOST: postgres
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_USER: postgres
PGADMIN_DEFAULT_PASSWORD: postgres
PGADMIN_DEFAULT_DB: postgres
ports:
- "5050:80"
PGAdmin UI does not list the postgress server.. though PGHOST value is given in pgadmin config.. it is better pgadmin support auto configure container db automatically
Tried with other environment variables too that also does not help..
e.g
PGADMIN_SERVER_MODE: "True"
PGADMIN_DEFAULT_SERVER: postgres
POSTGRES_DB_SERVER_HOST: postgres
POSTGRES_DB_SERVER_PORT: 5432
POSTGRES_DB_SERVER_MAINTENANCE_DATABASE: postgres
POSTGRES_DB_SERVER_USERNAME: postgres
POSTGRES_DB_SERVER_PASSWORD: postgres
@nagkumar To load servers to pgadmin , you need to specify server details in the json file and need to pass/map file path to environment variable of pgadmin service. Please refer to this link. or you can add server from UI.
pass/map file path to environment variable of pgadmin service
instead of file approach looking for special environment variable that I can define as part of pgadmin install to make this automatic. Is that possible.. if not wish that feature come in..
server from UI I want to avoid this step let docker-compose do that for me
We are not planning to implement this.
any reason for not seeing the priority..
In the micro services world trying to configure each admin manually can be truly painful and error prone, pgadmin can't be without postgre server.. wish some importance given to automate smartly