docs icon indicating copy to clipboard operation
docs copied to clipboard

Write guide about running on Serverless platforms

Open duncanmcclean opened this issue 5 months ago • 0 comments

This has come up a couple of times before, but it'd be nice to have a generalised guide to point folks to if they want to use a serverless platform, like Laravel Vapor or DigitalOcean App Platform.

There quite a lot of gotchas you need to be aware of when considering going "serverless" with a Statamic site:

  • Serverless platforms often have read-only filesystem, so you can't write back to flat-files, so content needs to be stored in a database.
  • By default, Statamic uses the file drivers for caching and sessions. You'll need to use database (or redis) drivers for this instead.
    • Laravel Vapor does this for you out of the box.
  • When using a platform like DigitalOcean's app platform, you will need to configure trusted proxies.
    • Laravel Vapor does this for you out of the box.

duncanmcclean avatar Sep 05 '24 15:09 duncanmcclean