App platform how to keep resources and volume beetwen deploys

Posted April 28, 2021 426 views
Vue.jsLaravelDigitalOcean App Platform

I have a laravel app and a vue.js static site deployed to digital ocean app platform. My question is if it’s possiblo to keep the volume beetwen deploys? For instance I am using Laravel Passport and basicaly i need to generate new keys after every redeploy. And the other thing is that it’s downloading resources every deploy and it’s taking alot of time. Is there a way to keep those data beetwen deploys?

Thanks for help

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.

Submit an Answer
1 answer

👋 @brackog

Currently App Platform does not support persistent volumes. This is a feature we are looking to implement in the future though no timeframe is available right now.

The keys could be persisted a few different ways:

  • In a database
  • In a DO Space
  • Pre-generating your Passport keys and injecting them into files from environment variables as part of the deploy process, here’s a link that talks about this

Hope this helps!

  • Thanks for you answer.

    I checked the link, but i still don’t understand how to store laravel passport keys as variable.
    Would that mean that i should put “php artisan passport:install” in deploy process? So every time the project gets deployed it would create new keys. So it generates two files oauth-private.key and oauth-public.key, how to attach those two files to variables?

  • I am fine with the DO spaces approach. How can i mount a space as a volume?