Skip to content

Commit

Permalink
chore: add more information on custom deployment setup
Browse files Browse the repository at this point in the history
  • Loading branch information
LesnyRumcajs committed Jan 9, 2025
1 parent c57481f commit 04bf250
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,23 @@ 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`.
### Account & domain
1. In <wrangler.toml>, set `account_id` to your CloudFlare account ID.
2. In <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>, 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>, 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`.

0 comments on commit 04bf250

Please sign in to comment.