A CLI for publishing standard.site documents to ATProto sequoia.pub
standard site lexicon cli publishing

Self-hosting as an option #18

open opened by heaths.dev

Stemming from our thread offline, I had an idea that maybe we could provide some self-hosting option as well. I still want to help make sequoia easy to deploy for non-technical people and happy to keep submitting PRs to that end. But since I also have my own Cloudflare account, I realized: why not self-host the web worker at least? I could use my own branding (colors, mainly), etc., and make the transition less jarring, not to mention can leave the default referrer-policy.

Off hand, I don't think much would be necessary. Maybe add a GET-only route for CSS and consolidate use to make things easier to update, define some CSS variables for most of the branding people would want, etc. Or maybe even a configuration value to override that with their own CSS path.

I dig this!! If we find a smooth way to do this I think we could make it a separate package like packages/worker or something like that. I used Cloudflare workers simply due to most of my other projects being hosted there, but I think with some tweaks we could make it way easier to self host. With our current worker you kinda have to use Cloudflare, but if we did a Hono API with Bun as the runtime, we could easily deploy to providers like Railway and make Docker images. The KV could be replaced by Bun's native Redis client.

Great idea! Docker is always a pretty good option for quick setup.

@heaths.dev Just added the ground work for this in PR #38! Will need some more work, and here's a few things off the top of my mind:

  • Consider switching from Redis to SQLite, while it does introduce a db it does make deployment much simpler
  • Deploy and test it e2e
  • Update how CSS works if we want to
  • Add CLI command to add the server package to someone's site repo?

Update: refactored to SQLite

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:tg3tb5wukiml4xmxml6qm637/sh.tangled.repo.issue/3mfx3uugxm722