How to see Postgres connection URL (cli crashed during deployment)

I launched a new app today with a Postgres database and the console errored while creating the database. And now I can’t see the password (that the CLI normally prints out). The deployment was successful and I can see the database running.

The error was the below. It appears that error is a mistake as the name wasn’t taken and the creation of the database was successful.

? Select configuration: Development - Single node, 1x shared CPU, 256MB RAM, 1GB disk
Creating postgres cluster [my-app]-db in organization [my-org]
Launching...⡿ Error failed creating the Postgres cluster [my-app]-db: Validation failed: Name has already been taken

How can I see the password or the connection URL?

I think there is an error with the CLI in general. When I try to set secrets it updates, but then it errors with Error No change detected to secrets.

Or is there a way to reset this password? I wasn’t able to see any credentials (as you can see in the log it failed straight away).

I couldn’t work out how to do this so I decided to delete the database and start again. It worked today with any hiccups.

If you attach the database to an app, and do fly ssh console into that app, you can echo $DATABASE_URL at the resulting command line to get at the value.

1 Like