From 6066d45fa573e1b9ad7049c7a747e163e54e4143 Mon Sep 17 00:00:00 2001 From: lemmih Date: Fri, 6 Dec 2024 13:21:56 +0100 Subject: [PATCH 1/3] document how to deploy the forest explorer on a clean CloudFlare account --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 18111a86..41251318 100644 --- a/README.md +++ b/README.md @@ -49,3 +49,10 @@ 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 + +To deploy to a new CloudFlare account, change `account_id` in `wrangler.toml`, +set `SECRET_WALLET` and `SECRET_MAINNET_WALLET` using `npx wrangler@latest secret put` +(values are exported private keys, see `forest-wallet export`), and run +`npx wrangler@latest deploy`. From c57481f31ce54d172d76eae56da16be3b4e63534 Mon Sep 17 00:00:00 2001 From: lemmih Date: Fri, 6 Dec 2024 16:01:33 +0100 Subject: [PATCH 2/3] pretty print README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 41251318..2b284695 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,6 @@ the faucet. # Custom deployments To deploy to a new CloudFlare account, change `account_id` in `wrangler.toml`, -set `SECRET_WALLET` and `SECRET_MAINNET_WALLET` using `npx wrangler@latest secret put` -(values are exported private keys, see `forest-wallet export`), and run -`npx wrangler@latest deploy`. +set `SECRET_WALLET` and `SECRET_MAINNET_WALLET` using +`npx wrangler@latest secret put` (values are exported private keys, see +`forest-wallet export`), and run `npx wrangler@latest deploy`. From 16c7065dfdced78f1703622279db4d57ff28d518 Mon Sep 17 00:00:00 2001 From: Hubert Bugaj Date: Thu, 9 Jan 2025 12:32:08 +0100 Subject: [PATCH 3/3] chore: add more information on custom deployment setup --- README.md | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2b284695..a1f3fdd3 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,40 @@ the faucet. # Custom deployments -To deploy to a new CloudFlare account, change `account_id` in `wrangler.toml`, -set `SECRET_WALLET` and `SECRET_MAINNET_WALLET` using +### 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`), and run `npx wrangler@latest deploy`. +`forest-wallet export`). + +### Deployment + +Run `npx wrangler@latest deploy`.