Skip to content

Instantly share code, notes, and snippets.

@andyklimczak
Created September 8, 2023 21:37
Show Gist options
  • Save andyklimczak/6cffb26bf86611ccd86c41e0ec8b5765 to your computer and use it in GitHub Desktop.
Save andyklimczak/6cffb26bf86611ccd86c41e0ec8b5765 to your computer and use it in GitHub Desktop.
How to access dokku postgres psql
dokku postgres:list
dokku postgres:info DBNAME
copy the DSN, something like postgres://postgres:password123@dokku-postgres-DBNAME:5432/db_name
dokku postgres:enter DBNAME
then inside the postgres container:
psql DSN
BUT CHANGE THE HOST NAME to localhost in DSN, so it should be something like postgres://postgres:password123@localhost:5432/db_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment