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?

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.

1 answer

👋 @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
Submit an Answer