Skip to content

Commit 16c7065

Browse files
committed
chore: add more information on custom deployment setup
1 parent c57481f commit 16c7065

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,40 @@ the faucet.
5252

5353
# Custom deployments
5454

55-
To deploy to a new CloudFlare account, change `account_id` in `wrangler.toml`,
56-
set `SECRET_WALLET` and `SECRET_MAINNET_WALLET` using
55+
### Account & domain
56+
57+
1. In [`wrangler.toml`](./wrangler.toml), set `account_id` to your CloudFlare
58+
account ID.
59+
2. In [`wrangler.toml`](./wrangler.toml), set `pattern` in routes to match your
60+
domain.
61+
62+
In order to deploy to a different CloudFlare account, you need to do the
63+
following:
64+
65+
### Rate limiter
66+
67+
If you have a paid CloudFlare account:
68+
69+
1. Create a KV store in CloudFlare. It can be found under the _Storage &
70+
Databases_ tab. The name can be anything.
71+
2. In [`wrangler.toml`](./wrangler.toml), set `id` in `kv_namespaces` to your KV
72+
store id (from step 1).
73+
74+
If you have a free CloudFlare account, you will need to disable the rate
75+
limiter. :warning: This is not recommended for production use as it will expose
76+
your service to abuse.
77+
78+
1. In [`wrangler.toml`](./wrangler.toml), remove or comment out
79+
`[durable_objects]` and `[migrations]` sections. Additionally, remove
80+
`kv_namespaces` from the `[env.quick]` section.
81+
2. Run `npx wrangler@latest secret put RATE_LIMITER_DISABLED true`.
82+
83+
### Wallets
84+
85+
Set `SECRET_WALLET` (calibnet) and/or `SECRET_MAINNET_WALLET` (mainnet) using
5786
`npx wrangler@latest secret put` (values are exported private keys, see
58-
`forest-wallet export`), and run `npx wrangler@latest deploy`.
87+
`forest-wallet export`).
88+
89+
### Deployment
90+
91+
Run `npx wrangler@latest deploy`.

0 commit comments

Comments
 (0)