Create a Database
Choose the engine
Select the database engine your application requires: PostgreSQL, MySQL, or MongoDB.
Select the project or workspace scope
Choose the owning project or set the database as a workspace-level resource that can be shared across projects.
Configure name, region, and resources
Enter a descriptive name for the database, select the region closest to your application containers, and review the resource settings (storage, compute tier).
Create and wait for active status
Click Create and wait for the database status to become active. Provisioning typically completes within a few minutes. A pending database may not accept connections yet.
Link a Database to a Project
Linking records the relationship between the database and a project so it appears in the project architecture view.Open the project
Navigate to Dashboard > Projects and select the project that should use the database.
Open the architecture or project overview area
Switch to the Overview tab inside the project workspace to see the architecture canvas.
Add the database service
Select the database service action on the canvas, then choose Existing database from the options.
Add Connection Values to the Container
Linking the database only records the relationship in the dashboard. Your application container needs the actual credentials as environment variables to connect at runtime.Add the connection variables
Add the variables your framework expects. Use the values you copied from the database detail page.
Use the external database URL
When your runtime container connects over the public database endpoint, use the external connection URL shown on the database detail page — not a localhost address.
Save the variables
Save all environment variables. They will be injected into the container on the next deployment.
Connection Variable Examples
Container Checklist
Before marking the database integration complete, verify each item in this checklist.| Check | Why it matters |
|---|---|
| Runtime environment variables are saved | Containers receive database credentials exclusively through environment variables — there is no automatic credential injection. |
The application reads DATABASE_URL or matching DB variables | Hardcoded local connection strings will fail after deployment. Ensure the application reads from the environment. |
| The database status is active | Databases in a pending or provisioning state may not accept connections. Wait for the active status before deploying. |
| The project was redeployed after variables were saved | Running containers do not automatically reload new environment values. A redeploy is always required. |
| Migrations are idempotent | Run migrations in a way that is safe to repeat, so that redeploys do not corrupt existing data. |
