Most of cloudfoundry based platform have postgres service in their catalog, applications could using the credentials bounded to their running environment for accessing, but sometimes the administrator need to access the database instance for whatever reason, debugging or checking specific record.

TeamPostgreSQL is a project of Webworks (, which is excellent for the webui based database management, using a single browser, user could manage the postgresql database.

  1. download release
/usr/bin/curl -# -o && \
unzip && rm -f
  1. generate deploy manifest file for teampostgresql

The application would use java buildpack for compiling and hosting, and need to specify JBP_CONFIG_JAVA_MAIN otherwise the http service won't start correctly

- name: psqlgui
  memory: 1G
  host: psqlgui
    JBP_CONFIG_JAVA_MAIN: '{arguments: "-cp WEB-INF/lib/log4j-1.2.17.jar-1.0.jar:WEB-INF/classes:WEB-INF/lib/* dbexplorer.TeamPostgreSQL $PORT"}'

  1. Deploy

using the following script to deploy application, before executing, need to obtain an account of cloudfoundry


WORK_DIR=`dirname "${0}"`

cf --version > /dev/null

if [[ $? -gt 0 ]];
    echo "CloudFoundry cli not installed"
    exit 1

cf push -f $WORK_DIR/manifest.yml -p $RUN_DIR/teampostgresql/webapp

After the deployment, the application could be access through webui and then configure database with credential of postgresql database instance