Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write guide about running on Serverless platforms #1448

Open
duncanmcclean opened this issue Sep 5, 2024 · 0 comments
Open

Write guide about running on Serverless platforms #1448

duncanmcclean opened this issue Sep 5, 2024 · 0 comments

Comments

@duncanmcclean
Copy link
Member

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 added a commit that referenced this issue Sep 5, 2024
Just ran through this guide, and it turns out it's pretty out-of-date now, especially with the fact it has a read-only filesystem which means you need to use the Eloquent Driver.

You also need to configure trusted proxies and know to move drivers to the database.

It's also pretty expensive compared to a traditional droplet, which would work fine for most sites.

With all that said, we're going to undocument this for now and write a generalised serverless guide in the future, see #1448.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant