Access postgres via an admin client

I’m evaluating gitpod for my team and stuck at one place.

How does one access port 5432 on the workspace-postgres image?

I can see the port is running locally with the status showing running.

But, when I try to add a server on my local(computer) pgadmin with the public url of postgres, it fails to connect. Should I be using a different port? If i use 443 I get an ssl negotiation error.

Gitpod only exposes ports through http. You can route ports through chisel (https://github.com/jpillora/chisel) or install pgadmin in your gitpod container.

understood.

I tried installing pgadmin in the gitpod contain and get the following error when I run the pgadmin4-web script following the guidelines on their website here https://www.pgadmin.org/download/pgadmin-4-apt/

    pgAdmin 4 - Application Initialisation
======================================

Creating storage and log directories...
We can now configure the Apache Web server for you. This involves enabling the wsgi module and configuring the pgAdmin 4 application to mount at /pgadmin4. Do you wish to continue (y/n)? y
The Apache web server is not running. We can enable and start the web server for you to finish pgAdmin 4 installation. Continue (y/n)? y
Synchronizing state of apache2.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable apache2
Apache successfully enabled.
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Error starting apache2. Please check the systemd logs

FWIW I’m looking into an example configuration that would spin up postgres and pgadmin using docker-compose. https://github.com/svenefftinge/postgres-compose

I was able to get pgadmin4 working with the regular workspace-postgres image:

https://gitlab.com/wil1/gitpod-pgadmin