Add a managed Postgres database
Goal: Give an app a dedicated managed PostgreSQL instance with DATABASE_URL injection.
Prerequisites:
- A project.
- An app in that project (optional — you can also create the DB first and attach later).
- In the project detail page, click New database.
- Choose a tier (see Managed Postgres reference for sizes).
- Give the database a name.
- Click Create. Provisioning takes about a minute.
- Once the database is Ready, open the app that should use it.
- Scroll to the Database card and select the database from the Attach database… dropdown. See Attach a database to an app for the full flow.
- Click Attach. Uploy injects the connection URI as the
DATABASE_URLenvironment variable and restarts the app.
Note: Databases are not attached to apps automatically. Each app must be attached explicitly via the Database card on the app detail page.
Verify
Section titled “Verify”- The Database card on the app page shows the attached database name.
- The app’s Environment tab shows
DATABASE_URLmarked injected. - Application logs show a successful connection to the database.
Backups
Section titled “Backups”Automated nightly backups are enabled by default. See Managed Postgres reference for retention.