You will want to set up the two .yml files in this repository to match the Postgres environment that you are wanting to run PgHero against. The bare minimum steps are as follows.
- in
docker-compose.yml- set the username, password, and hostaddress values in
DATABASE_URL. - under the
volumeskey, set the first path to match the location of yourpghero.ymlfile on your computer.
- set the username, password, and hostaddress values in
- in
pghero.yml- set up keys like those in the example file to correspond with the databases you would like to access with PgHero, replacing
database1anddatabase2with the actual names of the databases. - change the value of the
urlkey to correspond the username, password, host server address, and database name that you would like to connect to. - Note: PgHero seems to support as many of these database entries as you would like, pointed at multiple hosts. I have tested and confirmed it working with 30 databases, with 3 separate hosts and 10 databases on each host.
- set up keys like those in the example file to correspond with the databases you would like to access with PgHero, replacing
Run the following command from within the directory containing your docker-compose.yml and pghero.yml files.
docker-compose upOnce the container has fully spun up, visit port localhost:8080 in your web browser to access PgHero. When accessing it, you will see output from the PgHero container in the terminal from which the container was launched.
To shut down the container, use Ctrl+C in the terminal that is running the container.