Report this

What is the reason for this report?

Can App Platform persist data on a volume between releases?

Posted on December 14, 2020

Hi,

I am using DO App Platform for hosting a .net core web-application. This application uses a .xml-file to preserve the state of some encrypted keys between releases.

If this file is not persisted between releases, all users will be logged out, tokens will be invalid, and so on.

When hosting on a VM, you can put this file on a volume/disk and persist it that way, and on Docker you can persist it on a volume between releases.

Is there any options to persist a file between releases on App Platform? Or is the entire “Apps” recycled between releases?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

👋 @niklasCrab

App Platform apps are hosted in containers, because of this the filesystem is completely ephemeral, so in between releases all data stored in files will be lost.

We are planning to support attaching volumes to apps for persistent filesystems in the future. I don’t have a public timeline on this feature.

If this file is static you could inject it into one of our environment variables then save it to disk as part of the build command. I’ve done this in the passed with certificates.

For example:

// assuming a App Platform environment variable
// called MY_CERTIFICATE exists.
echo "${MY_CERTIFICATE}" > app-certificate.cert

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.