Docs: update UI install docs (#709)
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 231 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 38 KiB |
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## 创建数据库
|
## 创建数据库
|
||||||
|
|
||||||
打开 cloudflare 控制台,选择 `Workers & Pages` -> `D1` -> `Create Database`,点击创建数据库
|
打开 cloudflare 控制台,选择 `Storage & Databases` -> `D1 SQL Database` -> `Create Database`,点击创建数据库
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -10,13 +10,11 @@
|
|||||||
|
|
||||||
## 初始化数据库
|
## 初始化数据库
|
||||||
|
|
||||||
你也可以跳过初始化数据库,在部署完成后,在 admin 页面的 `快速设置` -> `数据库` 中,点击 `初始化数据库` 按钮来初始化数据库
|
|
||||||
|
|
||||||
::: warning 注意
|
::: warning 注意
|
||||||
下面输入的是 `db/schema.sql` 的内容
|
你也可以跳过初始化数据库,在部署完成后,在 admin 页面的 `快速设置` -> `数据库` 中,点击 `初始化数据库` 按钮来初始化数据库
|
||||||
:::
|
:::
|
||||||
|
|
||||||
打开 `Console` 标签页,输入 `db/schema.sql` 的内容,点击 `Execute` 执行
|
打开 `Console` 标签页,输入仓库中 [db/schema.sql](https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/db/schema.sql) 文件的内容,点击 `Execute` 执行
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ const generate = async () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
1. 点击 `Workers & Pages` -> `Overview` -> `Create Application`
|
1. 点击 `Compute (Workers)` -> `Workers & Pages` -> `Create`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
2. 选择 `Pages`,选择 `Create using direct upload`
|
2. 选择 `Pages`,选择 `Use direct upload`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -3,15 +3,16 @@
|
|||||||
> [!warning] 注意
|
> [!warning] 注意
|
||||||
> `worker.dev` 域名在中国无法访问,请自定义域名
|
> `worker.dev` 域名在中国无法访问,请自定义域名
|
||||||
|
|
||||||
1. 点击 `Workers & Pages` -> `Overview` -> `Create Application`
|
1. 点击 `Compute (Workers)` -> `Workers & Pages` -> `Create`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
2. 选择 `Worker`,点击 `Create Worker`, 修改名称然后点击 `Deploy`
|
2. 选择 `Worker`,点击 `Create Worker`, 修改名称然后点击 `Deploy`
|
||||||
|
|
||||||

|

|
||||||
|

|
||||||
|
|
||||||
3. 回到 `Overview`,找到刚刚创建的 worker,点击 `Settings` -> `Runtime`, 修改 `Compatibility flags`, 增加 `nodejs_compat`, 兼容日期也需要大于图片中的日期。
|
3. 回到 `Workers & Pages`,找到刚刚创建的 worker,点击 `Settings` -> `Runtime`, 修改 `Compatibility flags`, 手动输入增加 `nodejs_compat`, 兼容日期也需要大于图片中的日期。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -26,10 +27,11 @@
|
|||||||
>
|
>
|
||||||
> 参考: [issues156](https://github.com/dreamhunter2333/cloudflare_temp_email/issues/156#issuecomment-2079453822)
|
> 参考: [issues156](https://github.com/dreamhunter2333/cloudflare_temp_email/issues/156#issuecomment-2079453822)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
6. 点击 `Settings` -> `Variables`, 如图所示添加变量
|
6. 点击 `Settings` -> `Variables and Secrets`, 如图所示添加变量
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -51,12 +53,16 @@
|
|||||||
| `ENABLE_USER_CREATE_EMAIL` | 文本/JSON | 是否允许用户创建邮箱, 不配置则不允许 | `true` |
|
| `ENABLE_USER_CREATE_EMAIL` | 文本/JSON | 是否允许用户创建邮箱, 不配置则不允许 | `true` |
|
||||||
| `ENABLE_USER_DELETE_EMAIL` | 文本/JSON | 是否允许用户删除邮件, 不配置则不允许 | `true` |
|
| `ENABLE_USER_DELETE_EMAIL` | 文本/JSON | 是否允许用户删除邮件, 不配置则不允许 | `true` |
|
||||||
|
|
||||||
7. 点击 `Settings` -> `Variables`, 下拉找到 `D1 Database`, 点击 `Add Binding`, 名称如图,选择刚刚创建的 D1 数据库,点击 `Deploy`
|
7. 点击 `Settings` -> `Bindings`, 点击 `Add Binding`, 名称如图,选择刚刚创建的 D1 数据库,点击 `Add Binding`
|
||||||
|
|
||||||
> [!NOTE] 重要
|
> [!NOTE] 重要
|
||||||
> 注意此处 `D1 Database` 的绑定名称必须为 `DB`
|
> 注意此处 `D1 Database` 的绑定名称必须为 `DB`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
8. 点击 `Settings` -> `Trggers`, 这里可以添加自己的域名,你也可以使用自动生成的 `*.workers.dev` 的域名。记录下这个域名,后面部署前端会用到。
|
8. 点击 `Settings` -> `Trggers`, 这里可以添加自己的域名,你也可以使用自动生成的 `*.workers.dev` 的域名。记录下这个域名,后面部署前端会用到。
|
||||||
|
|
||||||
@@ -67,24 +73,35 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
9. 如果你要启用注册用户功能,并需要发送邮件验证,则需要创建 `KV` 缓存, 不需要可跳过此步骤,点击 `Workers & Pages` -> `KV` -> `Create Namespace`, 如图,点击 `Create Namespace`,然后在 `Settings` -> `Variables`, 下拉找到 `KV`, 点击 `Add Binding`, 名称如图,选择刚刚创建的 `KV` 缓存,点击 `Deploy`
|
9. 如果你要启用注册用户功能,并需要发送邮件验证,则需要创建 `KV` 缓存, 不需要可跳过此步骤
|
||||||
|
|
||||||
> [!NOTE] 重要
|
> [!NOTE] 重要
|
||||||
> 如果你要启用注册用户功能,并需要发送邮件验证,则需要创建 `KV` 缓存, 不需要可跳过此步骤
|
> 如果你要启用注册用户功能,并需要发送邮件验证,则需要创建 `KV` 缓存, 不需要可跳过此步骤
|
||||||
>
|
>
|
||||||
> 注意此处 `KV` 的绑定名称必须为 `KV`
|
> 注意此处 `KV` 的绑定名称必须为 `KV`
|
||||||
|
|
||||||
|
点击 `Storage & Databases` -> `KV` -> `Create Namespace`, 如图,点击 `Create Namespace`
|
||||||
|
|
||||||

|

|
||||||

|
|
||||||
|

|
||||||
|
|
||||||
|
然后点击 `Settings` -> `Bindings`, 点击 `Add Binding`, 名称如图,选择刚刚创建的 KV,点击 `Add Binding`
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
10. Telegram Bot 配置
|
10. Telegram Bot 配置
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> 如果不需要 Telegram Bot, 可跳过此步骤
|
> 如果不需要 Telegram Bot, 可跳过此步骤
|
||||||
|
|
||||||
请先创建一个 Telegram Bot,然后获取 `token`,然后执行下面的命令,将 `token` 添加到 `Variables` 中, Name: `TELEGRAM_BOT_TOKEN`
|
请先创建一个 Telegram Bot,然后获取 `token`,将 `token` 添加到 `Variables and Secrets` 中, 变量名称: `TELEGRAM_BOT_TOKEN`
|
||||||
|
|
||||||
11. 如果你想要使用 admin 页面中的定时任务清理邮件,需要到 `Settings` -> `Triggers` -> `Cron Triggers` 中添加定时任务.
|
11. 如果你想要使用 admin 页面中的定时任务清理邮件,需要到 `Settings` -> `Trigger Events` -> `Cron Triggers` 中添加定时任务.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> 选择 `cron` 表达式,输入 `0 0 * * *`(此表达式表示每天午夜运行),点击 `Add` 增加。请根据您的需求调整此表达式。
|
> 选择 `cron` 表达式,输入 `0 0 * * *`(此表达式表示每天午夜运行),点击 `Add` 增加。请根据您的需求调整此表达式。
|
||||||
|
|||||||