If you fly postgres attach
, it will add a DATABASE_URL
to your server that you can use to retrieve the password
➜ shopify git:(main) ✗ fly postgres attach --help
Attach a postgres cluster to an app
Usage:
flyctl postgres attach [flags]
Flags:
-a, --app string App name to operate on
-c, --config string Path to an app config file or directory containing one (default "./fly.toml")
--database-name string database to use, defaults to a new database with the same name as the app
--database-user string the database user to create, defaults to creating a user with the same name as the consuming app
-h, --help help for attach
--postgres-app string the postgres cluster to attach to the app
--variable-name string the env variable name that will be added to the app. Defaults to DATABASE_URL
Global Flags:
-t, --access-token string Fly API Access Token
-j, --json json output
--verbose verbose output