Can App Platform persist data on a volume between releases?


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?

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

👋 @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