The problem is I can’t connect the pgadmin to my postgre server.I have a database server as postgresql in my ubuntu vps machine, and a pgadmin as a docker container, the postgresql is not in docker at all, and moving it to docker is not an option for some reason’s it’s not worth to talk about.
I pick the ip of docker (ip by docker inspect) container regarding pgadmin and added it to postgresql.conf
listen_addresses = 'localhost,container_ip'
But it not resolved the issue, I also tried to open the port of postgre server but it not resolved anything. Also tried PgAdmin running in Docker can’t connect to Postgres server, I run
docker run --name pg-admin-4 -e "PGADMIN_DEFAULT_EMAIL=myemail" -e "PGADMIN_DEFAULT_PASSWORD=mypass" -d -p 5050:80 dpage/pgadmin4 --restart always --add-host host.docker.internal:host-gateway
And put host.docker.internal in database host/adress on pgadmin UI but still cant connect.