Databases
Apply.Build runs managed PostgreSQL and Valkey databases next to your apps.
Creating a database
- Go to Databases and click Deploy Database
- Choose the engine
- Enter a name and choose the version, and for PostgreSQL the number of instances
- Choose a subscription and a size
Each database instance counts towards your subscription's resources like an app of the same size.
Connecting an app
Databases only accept connections from apps you connect to them.
- Open the database and go to the Connections tab
- Turn on access for each app that should reach the database
Then copy the Connection URI from the Credentials tab into an environment variable on your app, for example DATABASE_URL or REDIS_URL. See Environment Variables.
PostgreSQL
- Versions. 14, 15 and 16.
- Instances. 1 to 10: one primary, and the rest are replicas that take over if the primary fails.
- Backups. Point-in-time recovery for the last 7 days.
Valkey
Valkey works with existing Redis clients and libraries.
- Version. 8.1.
- Instances. One. If its node fails, it is restarted on another node with its data, which takes a few minutes.
- Backups. None. Don't use Valkey as the only copy of data you can't recreate.
- Persistence. Data is written to disk and survives restarts. On a crash, up to about one second of writes can be lost.
- Memory limit. When the database is full, writes fail with an out-of-memory error. Existing keys are never evicted, so choose a size that fits your data.
Deleting a database
Deleting a database permanently removes it and all of its data.