docs
Local Development
pgAdmin 4

Connecting to a Local PostgreSQL Container

pgAdmin 4 is a popular open-source tool for managing PostgreSQL databases. It provides a graphical interface that makes it easier to interact with PostgreSQL databases compared to using the command line. In this guide, we'll walk through the steps to connect pgAdmin 4 to a PostgreSQL database running in a local Docker container.

Step 1: Run Docker Compose

Make sure your containers are up and running.

npm run docker:compose

Step 2: Open pgAdmin 4

Open your pgAdmin 4 desktop app.

Step 3: Register a New Server

Right click on the Servers -> Register -> Server...

Create Permission Set

Step 4: General Tab

  • Name: postgres-db (DB_SERVICE_NAME from .env)

Create Permission Set

Step 5: Connection Tab

  • Host name/address: localhost

  • Port: 5432 (DB_PORT from .env)

  • Maintenance database: launchgoatDev (DB_NAME from .env)

  • Username: launchgoatDevAdmin (DB_USERNAME from .env)

  • Password: hello (DB_PASSWORD from .env)

Create Permission Set

Step 6: Check postgres-db is Created

Access launchgoatDev database.

Create Permission Set

Step 7: Open Query Tool

Right click on the Tables -> Query Tool

Create Permission Set

Step 8: Check Seeded Data

Type and run

SELECT * FROM "User";

Create Permission Set