Problem configuring local PostgreSQL server

Even if you probably don’t care, I’ve been using docker since like forever for this. As local postgres setups are annoying

Here’s my docker-compose.yml with the other services removed

version: "3"
services:
  database:
    image: postgres:15
    # NOTE: avoid collision with local postgres port
    ports:
      - 6543:5432
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: ${POSTGRES_DB}
    restart: unless-stopped

I start this via docker-compose up database each morning.

Then connect with pgAdmin:
Hostname: localhost
Port: 6543

And that’s it

2 Likes