App Platform is a Platform-as-a-Service (PaaS) offering that allows developers to publish code directly to DigitalOcean servers without worrying about the underlying infrastructure.
The following options are available to developers who need to store files and data in their App Platform app.
You can create a managed relational database from directly within App Platform for use in your app. For more details, see the Manage Database topic.
DigitalOcean offers a product called Spaces, which is compatible with Amazon’s S3 buckets. Spaces provide programmatic access to file storage at scale.
To use Spaces in your application, read the Spaces quickstart to create a Space, and then begin using the Space in your code via the RESTful API or existing AWS S3 tools.
If you are writing files for temporary use, you can use the local filesystem. However, keep these two things in mind:
Instances are ephemeral, and are being continuously created and destroyed as the app is scaled, redeployed, etc, and any changes to the filesystem will be destroyed with the instance. This means that every redeployment of your app will reset the filesystem.
If you have a multi-instance app from scaling horizontally, you should remember that each instance has a separate filesystem. Because of this, you should not use the local filesystem for anything that needs to be stateful.
Volumes are not currently supported in App Platform. Volumes are detachable network volumes that are mounted directly in the filesystem and extend the storage available to an instance. Because App Platform instances can be scaled and are ephemeral, more work needs to be done to ensure these mounts remain persistent and the data view that each instance sees is consistent.