Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: document how to deploy the forest explorer on a clean CloudFlare account #86

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,43 @@ the faucet.
- [wrangler](https://github.com/cloudflare/wrangler2)
- [wasm-pack](https://github.com/rustwasm/wasm-pack)
- [worker-build](https://github.com/cloudflare/workers-rs/tree/main/worker-build)

# Custom deployments

### Account & domain

1. In [`wrangler.toml`](./wrangler.toml), set `account_id` to your CloudFlare
account ID.
2. In [`wrangler.toml`](./wrangler.toml), set `pattern` in routes to match your
domain.

In order to deploy to a different CloudFlare account, you need to do the
following:

### Rate limiter

If you have a paid CloudFlare account:

1. Create a KV store in CloudFlare. It can be found under the _Storage &
Databases_ tab. The name can be anything.
2. In [`wrangler.toml`](./wrangler.toml), set `id` in `kv_namespaces` to your KV
store id (from step 1).

If you have a free CloudFlare account, you will need to disable the rate
limiter. :warning: This is not recommended for production use as it will expose
your service to abuse.

1. In [`wrangler.toml`](./wrangler.toml), remove or comment out
`[durable_objects]` and `[migrations]` sections. Additionally, remove
`kv_namespaces` from the `[env.quick]` section.
2. Run `npx wrangler@latest secret put RATE_LIMITER_DISABLED true`.

### Wallets

Set `SECRET_WALLET` (calibnet) and/or `SECRET_MAINNET_WALLET` (mainnet) using
`npx wrangler@latest secret put` (values are exported private keys, see
`forest-wallet export`).

### Deployment

Run `npx wrangler@latest deploy`.
Loading