If you use HANA on SAP BTP, you have HANA DB Explorer built-in. But what about PostgreSQL?
While locally running a DB explorer for BTP PostgreSQL requires SSH tunneling (which isn't very convenient), there's a better way. You can deploy pgAdmin4 Web directly to your BTP subaccount with just a few commands, allowing your whole team to access it conveniently.
- CF CLI installed and configured
- Developer role in your BTP space
- Access to your BTP PostgreSQL instance
Check if Docker support is enabled in your environment:
cf feature-flags | grep diego_docker
If not enabled, and you have admin privileges:
cf enable-feature-flag diego_docker
Deploy the pgAdmin web interface:
cf push pgadmin-web --docker-image dpage/pgadmin4:latest -m 1G -k 1G --health-check-type process --random-route --no-start
Set the required environment variables:
cf set-env pgadmin-web PGADMIN_DEFAULT_EMAIL <your-admin-email>
cf set-env pgadmin-web PGADMIN_DEFAULT_PASSWORD <your-secure-password>
cf set-env pgadmin-web PGADMIN_LISTEN_ADDRESS 0.0.0.0
cf start pgadmin-web
After deployment, check your application's route using:
cf app pgadmin-web
The random route will be displayed in the output, typically in the format:
https://pgadmin-web-<random-string>.<your-cf-domain>
Log in using the email and password you set in the environment variables.
- For production environments, consider using a specific version tag instead of
latest
- Ensure you use a strong password for the admin account
- The application uses 1GB of memory by default
- The random route ensures no conflicts with other deployments in the same domain
Feel free to contribute to this project by submitting issues or pull requests.
MIT License