dockerbitnamipostgresql-12phppgadmin

docker and bitnami/phppgadmin: How to connect to the remote postgresql database


I am trying to connect to a remote postgresql database using the bitnami/phppgadmin docker

How to mention the host name

  phppgadmin:
    image: "bitnami/phppgadmin:7.13.0"
    ports:
      - "8080:8080"
      - '443:8443'
    environment:
      PHP_PG_ADMIN_SERVER_HOST: 'xx.xx.xx.xx'
      PHP_PG_ADMIN_SERVER_PORT: 5432

I am trying this, but i am not able to login in the dash board.

I have set the env variables based on the dockage/phppgadmin. BUt bitnami has no such options


Solution

  • Every image on Docker Hub has a corresponding page; you can look at https://hub.docker.com/r/bitnami/phppgadmin. That has an "Environment variables" section, which documents:

    The phpPgAdmin instance can be customized by specifying environment variables on the first run. The following environment values are provided to custom phpPgAdmin:

    • DATABASE_HOST: Database server host. Default: postgresql.

    So use DATABASE_HOST as the environment variable name. There is also DATABASE_PORT_NUMBER but you don't need to explicitly set it to the PostgreSQL default value.