Kloadut / dokku-pg-plugin

PostgreSQL plugin for Dokku
201 stars 75 forks source link

Add a semantically meaningful way to open a PostgreSQL console. #49

Closed dschwertfeger closed 10 years ago

dschwertfeger commented 10 years ago

This PR adds the ability to open a psql console to the specified database container with the command

dokku postgresql:console <db>

I was looking for a way to do this and for a while I would just manually connect with psql -h 172.17.42.1 -p 49153 -U root db. Then, I saw that the postgresql:restore command does exactly that when you don't provide the dump file with < dump_file.sql.

Since this didn't feel very correct in a semantic way, I added the feature to achieve this with the console command mentioned above.

The README has been updated as well to show the newly added command.

Kloadut commented 10 years ago

Thanks !