Deploy to Netlify
Drop on Netlify Functions, with a Cloudflare D1 database, Netlify Blobs for files, and a scheduled function that deletes expired code images.
| Database | D1 over HTTP |
| Files | Netlify Blobs |
| Rate limits | Per instance |
| Code images | SVG |
| Code image cleanup | Scheduled function |
Settings
| Variable | What it is |
|---|---|
| GITHUB_CLIENT_ID | Your GitHub OAuth app's client ID. |
| GITHUB_CLIENT_SECRET | A client secret from the same app. |
| BETTER_AUTH_SECRET | Signs sessions and agent tokens. One per deployment: openssl rand -base64 32 |
| DROP_ADMINS | GitHub user ids that join as Admin, comma-separated: gh api users/<login> --jq .id |
| CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN | Cloudflare account id and an account API token with D1 edit access. |
| CLOUDFLARE_D1_DATABASE_ID, CLOUDFLARE_D1_DATABASE_NAME | Your D1 database id and name. |
| DROP_HOST | netlify. Set in netlify.toml. |
Database
Cloudflare D1 over HTTPS. pnpm db:migrate:d1 skips migrations already applied. The configured Netlify build runs it after building. Disable deploy previews or give them a separate D1 database.
On Netlify
- Code images are SVG only: PNG needs Cloudflare Browser Run.
- Rate limits count in memory per function instance, so they're looser than on Cloudflare.
- Files go to a Netlify Blobs store, and Drop serves them at
/f/after checking access. - A scheduled function deletes expired code images every hour.