Our great sponsors
-
heroku-buildpack-borealis-pg-ssh
Discontinued [DEPRECATED] Use https://github.com/OldSneerJaw/heroku-buildpack-borealis-pg-tunnel instead.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
So how does an app connect? I wrote a Heroku buildpack to take care of that seamlessly (borealis/postgres-ssh). When you add the buildpack to an app, it automatically identifies any config variables from my add-on and sets up a persistent SSH local port forwarding connection to the database server using autossh. The app can then connect to the database via a standard PostgreSQL client library using the add-on's DATABASE_URL config variable without having to be aware of the SSH connection in any way. In other words, application code doesn't have to change at all to support it. If the app works with the first-party Heroku Postgres add-on, it should work with my add-on, too.