superfly/docs

Connect From a Fly App Unclear documentation

Closed this issue · 1 comments

This documentation page doesn't explain how to generate a connection string for a database that was previously generated. When I launched Fly in my repo, it automatically created both my app and an empty Postgres DB.

I have not seen any documentation on how to generate a connection string, and I do not know where to find the correct parameters for the connection string. If there is a page for this please let me know. Otherwise, the documentation needs clarification.

You can't generate a connection string from an existing Postgres db app. It's printed in the output when the Postgres app is created (along with your connecting app). The connection string was added at this point to your connecting app as a secret, DATABASE_URL. This is not a secure way to do things, but you could retrieve the connection string by using fly ssh console to ssh into one of the connecting app's machines and print the DATABASE_URL to console, like printenv DATABASE_URL.