We now deploy on Hatchbox. This means we need a way to
run commands on the server, get database backups, and deploy via the command
line. This introduces those tools and some Hatchbox documentation.
This fixes the bin/restore_db tool to restore from the hatchbox db. Hatchbox
does not expose the database directly (which is good, overall). So to get access
to it, we first need to set up a proxy to forward psql connections (port 5432)
to your computer. Then the database can be accessed using normal psql commands,
but now on port 65432.
I found these two answers very helpful:
We now deploy on [Hatchbox](https://hatchbox.io). This means we need a way to
run commands on the server, get database backups, and deploy via the command
line. This introduces those tools and some Hatchbox documentation.
This fixes the bin/restore_db tool to restore from the hatchbox db. Hatchbox
does not expose the database directly (which is good, overall). So to get access
to it, we first need to set up a proxy to forward psql connections (port 5432)
to your computer. Then the database can be accessed using normal psql commands,
but now on port `65432`.
I found these two answers very helpful:
- https://superuser.com/a/1314015
- https://stackoverflow.com/a/26470428/638966