disk
Back to home
On this page
An integer (or null) that defines the disk space allocated (in MB) to an app.
Optional in single-runtime and composable images.
The maximum total space available to all apps and services is set by the storage in your plan settings.
When deploying your project, the sum of all disk keys defined in app and service configurations
must be equal or less than the plan storage size.
So if your plan storage size is 5 GB, you can, for example, assign it in one of the following ways:
- 2 GB to your app, 3 GB to your database
- 1 GB to your app, 4 GB to your database
- 1 GB to your app, 1 GB to your database, 3 GB to your OpenSearch service
If you exceed the total space available, you receive an error on pushing your code.
You need to either increase your plan’s storage or decrease the disk values you’ve assigned.
You configure the disk size in MB. Your actual available disk space is slightly smaller with some space used for formatting and the filesystem journal. When checking available space, note whether it’s reported in MB or MiB.
Altering disk values
It’s a best practice to back up your environment before and after you increase or decrease the disk value (the amount of allocated storage space) of an app or service.
You can decrease the size of an existing disk for an app. If you do so, be aware that:
- Downsizing fails if the amount of data exceeds the configured
diskvalue. - Backups completed before the downsizing a disk are incompatible and can no longer be used to restore applications. You need to create new backups.