Open alanplotko opened 2 years ago
Upgraded from Cloudflare KV to Mongo Atlas + Realm. Backups can be done with tools like docker-mongodump for a M0 free instance. While 512mb < 1gb with Cloudflare, there are much higher limits in requests.
~- TODO: Move to custom claps JS on frontend.~ Overhaul of claps completed in ddccfba03b5f2e545e12e52875baff6034d1b66a.
Reviewing the Options
Comments
Likes
Self-hosting
_data/
and rebuild the siteExternal Hosting
Brainstorming
Heroku allows running a free web dyno for 1000 hours a month if the account is verified. Given 31 days * 24 hours = 744 hours in a month at most, you can run 24/7 with pinging services like New Relic to keep the dyno from sleeping. That still leaves enough for one-off dynos on the side if needed.
There aren't many options that handle both likes and comments in one dyno, so either:
Approach
Let's go with option 2.
Staticman can be hosted with Heroku and is the most lightweight to embed into the Jekyll blog (it's static!). Testing can be done with create sample data files with comments. Staticman can also be deployed via netlify as a serverless function.
The Cloudflare KV store offering is sufficient to track likes and caching can be implemented at edge. The like counter is a simple increment, following Medium system of up to 50 points per user. The browser's local storage can track capacity up to 50 point allotment.