I'm currently working on a project that allows editors to upload content, which then reflects on the main site. This content goes to an S3-compatible storage (Cloudflare R2 in my case) and is linked to entities in the CMS. My pages serve assets from this bucket, so I can easily revalidate them to see updates live.
This made me wonder if hosting all static assets, like hero images, backgrounds, and one-off icons, on this kind of setup is a smart move.
There are some downsides I recognize, like the speed of handling files locally (can this be managed with S3 buckets too?), along with challenges regarding version control, backups, and the convenience of free static file hosting. However, since Cloudflare R2 is quite affordable, it seems feasible to host more assets there.
I'm curious about how larger companies manage their static assets. Do they rely on a CMS? What practices do they follow for versioning and backups? Is there any automation involved?
Furthermore, how do you ensure access control or security for these buckets? And what naming scheme would work best for the files in these buckets? I'm having a tough time finding resources that address these questions, so any guidance would be appreciated!
1 Answer
I stick with GitHub Pages for my front-end projects, keeping all the static files in the same repo. It's pretty seamless!
Related Questions
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads