How to know DATABASE_URL, DB_USERNAME, and DB_PASSWORD ?

Hi,
I know that we can get DATABASE_URL, DB_USERNAME, and DB_PASSWORD when we input the attach command.

fly postgres attach <postgres app name> --app <app name>

But this command is essentially not to get these variables.
Is there a better approach to get them?

Does it not output the values when you create the pg db? If not, try fly ssh console into your app and echo out those variables.

Thank you for your reply.

No, it doesn’t output them.

May I know what you expect after trying fly ssh console?
I don’t have any ideas to get their variable with ssh connecting.

‘echo $DATABASE _URL’

Ahh, I got it.
Thank you! it works

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.