Hi!
I don’t understand how to connect to postgres cluster.
I deployed a .Net app. Then created pg cluster. After that I attached my app to postgres by using this command:
flyctl postgres attach --app <app-name> <postgres-app-name>
And got the connection string, stored in app secrets:
DATABASE_URL=postgres://app-name:password@hostname:5432/app-name?sslmode=disable
But when I run the deployed app I receive such an error at the webpage:
Error.
An error occurred while processing your request.
Request ID: 00-dbc3f379efb8c9743f8bc8dcd3977e82-3c0bb27ffcc72636-00
Development Mode
Swapping to Development environment will display more detailed information about the error that occurred.
The Development environment shouldn’t be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app.
In logs I got this:
System.ArgumentException: Couldn't set postgres:<my connection string> (Parameter '<my connection string>')
What am I doing wrong?