Deploy to Deno Deploy
Drop on Deno Deploy, with a Cloudflare D1 database and an S3-compatible bucket for files, like Cloudflare R2 or Amazon S3.
| Database | D1 over HTTP |
| Files | R2 S3 API |
| Rate limits | Per instance |
| Code images | SVG |
| Code image cleanup | None |
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. |
| S3_BUCKET | The bucket you created, my-drop in the command above. Read at build time. |
| S3_ENDPOINT | https://<account-id>.r2.cloudflarestorage.com for R2. Read at build time. |
| S3_REGION | auto for R2. Read at build time. |
| AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY | The bucket's access key. |
Database
Cloudflare D1 over HTTPS. pnpm db:migrate:d1 skips migrations already applied. The GitHub flow runs it as a pre-deploy command. For a local build, run it before publishing.
On Deno Deploy
- Code images are SVG only: PNG needs Cloudflare Browser Run.
- Rate limits count in memory per isolate, so they're looser than on Cloudflare.
- Nothing deletes expired code images: ViteHub has no scheduled jobs on Deno Deploy yet. They stop being served after five minutes, but stay in the bucket; a lifecycle rule on
code-images/cleans them up.