upd docs
This commit is contained in:
1 parent
06994fec84
commit
8d6ce9bd0d
6 files changed
+288
-274
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<div align="center">
|
||||
<h1>𝐕𝐌𝐀𝐈𝐋.𝐃𝐄𝐕</h1>
|
||||
<p><a href="https://github.com/oiov/vmail/blob/main/README_en.md">English</a> | 简体中文</p>
|
||||
<p><a href="https://discord.gg/d68kWCBDEs">Discord</a> · <a href="https://github.com/oiov/vmail/blob/main/README_en.md">English</a> | 简体中文</p>
|
||||
<p>使用 Cloudflare email worker 实现的临时电子邮件服务</p>
|
||||
<img src="https://img.inke.app/file/beb0212f96c6cd37eaeb8.jpg"/>
|
||||
</div>
|
||||
@@ -18,7 +18,7 @@
|
||||
- 前端显示电子邮件(remix)
|
||||
- 邮件存储(sqlite)
|
||||
|
||||
发件原理
|
||||
发件原理:
|
||||
|
||||
- 手打中...
|
||||
|
||||
@@ -30,152 +30,13 @@
|
||||
- [turso](https://turso.tech) sqlite 数据库(个人免费计划足够)
|
||||
- [Vercel](https://vercel.com) 或 [fly.io](https://fly.io) 账号部署前端用户界面
|
||||
|
||||
### 接收邮件步骤
|
||||
### 接收邮件教程
|
||||
|
||||
**1.注册一个 [turso](https://turso.tech) 账户,创建数据库,并创建一个`emails`表**
|
||||
查看 [receive-tutorial.md](/docs/receive-tutorial.md)
|
||||
|
||||
注册后,系统会提示您创建一个数据库。在这里我将其命名为 `vmail`,
|
||||
### 发送邮件教程
|
||||
|
||||

|
||||
|
||||
然后,创建一个名为 `emails` 的表。
|
||||
|
||||
选择您的数据库,您会看到“编辑表”按钮,点击并进入:
|
||||
|
||||

|
||||
|
||||
> ⚠️ 注意:**左上角有一个加号按钮,我尝试点击它没有任何提示或效果,所以我使用了 turso 提供的 cli 来初始化表。**
|
||||
|
||||
Cli 文档:https://docs.turso.tech/cli/introduction
|
||||
|
||||
Linux (或 mac/windows) 终端执行:
|
||||
|
||||
```bash
|
||||
# 安装(安装后记得重启终端生效)
|
||||
curl -sSfL https://get.tur.so/install.sh | bash
|
||||
|
||||
# 登录账户
|
||||
turso auth login
|
||||
|
||||
# 连接到您的Turso数据库
|
||||
turso db shell <database-name>
|
||||
```
|
||||
|
||||
将sql脚本复制到终端运行(packages/database/drizzle/0000_sturdy_arclight.sql)
|
||||
|
||||
<details>
|
||||
<summary>查看脚本内容</summary>
|
||||
<pre ><code>CREATE TABLE `emails` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`message_from` text NOT NULL,
|
||||
`message_to` text NOT NULL,
|
||||
`headers` text NOT NULL,
|
||||
`from` text NOT NULL,
|
||||
`sender` text,
|
||||
`reply_to` text,
|
||||
`delivered_to` text,
|
||||
`return_path` text,
|
||||
`to` text,
|
||||
`cc` text,
|
||||
`bcc` text,
|
||||
`subject` text,
|
||||
`message_id` text NOT NULL,
|
||||
`in_reply_to` text,
|
||||
`references` text,
|
||||
`date` text,
|
||||
`html` text,
|
||||
`text` text,
|
||||
`created_at` integer NOT NULL,
|
||||
`updated_at` integer NOT NULL
|
||||
);
|
||||
</code></pre>
|
||||
</details>
|
||||
|
||||
**2.部署 email worker**
|
||||
|
||||
```bash
|
||||
git clone https://github.com/yesmore/vmail
|
||||
|
||||
cd vmail
|
||||
|
||||
# 安装依赖
|
||||
pnpm install
|
||||
```
|
||||
|
||||
在 `vmail/apps/email-worker/wrangler.toml` 文件中填写必要的环境变量。
|
||||
|
||||
- TURSO_DB_AUTH_TOKEN(第1步中的turso表信息,点击“Generate Token”)
|
||||
- TURSO_DB_URL(例如 libsql://db-name.turso.io)
|
||||
- EMAIL_DOMAIN (域名,如 vmail.dev)
|
||||
|
||||
> 如果您不执行此步骤,可以在Cloudflare的 worker settings 中添加环境变量
|
||||
|
||||
然后运行命令:
|
||||
|
||||
```bash
|
||||
cd apps/email-worker
|
||||
|
||||
# 需要 Node 环境,并且需要安装 wrangler cli 并在本地登录,参考 https://developers.cloudflare.com/workers/wrangler/install-and-update
|
||||
pnpm run deploy
|
||||
```
|
||||
|
||||
**3.配置电子邮件路由规则**
|
||||
|
||||
设置“Catch-all”操作为发送到 email worker:
|
||||
|
||||

|
||||
|
||||
**4.在 Vercel 或 fly.io 上部署 Remix 应用程序**
|
||||
|
||||
确保在部署期间准备并填写以下环境变量(`.env.example`):
|
||||
|
||||
| 变量名 | 说明 | 示例 |
|
||||
| ---------------------- | ------------------------------------ | --------------------------- |
|
||||
| COOKIES_SECRET | 必填,cookie加密密钥 | `my-secret-key` |
|
||||
| TURNSTILE_KEY | 必填,网站验证所需的Turnstile Key | `my-turnstile-key` |
|
||||
| TURNSTILE_SECRET | 必填,网站验证所需的Turnstile Secret | `my-turnstile-secret` |
|
||||
| TURSO_DB_RO_AUTH_TOKEN | 必填,turso数据库只读凭据 | `my-turso-db-ro-auth-token` |
|
||||
| TURSO_DB_URL | 必填,turso数据库URL | `libsql://db-name.turso.io` |
|
||||
| EMAIL_DOMAIN | 必填,域名后缀 | `vmail.dev` |
|
||||
| EXPIRY_TIME | 可选,过期时间,单位秒,默认86400 | `86400` |
|
||||
|
||||
**Vercel:**
|
||||
|
||||
推荐使用一键部署按钮(一步 `fork + deploy` 此仓库):
|
||||
|
||||
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Foiov%2Fvmail&env=COOKIES_SECRET&env=TURNSTILE_KEY&env=TURNSTILE_SECRET&env=TURSO_DB_RO_AUTH_TOKEN&env=TURSO_DB_URL&env=EMAIL_DOMAIN&project-name=vmail&repository-name=vmail)
|
||||
|
||||
或手动将代码推送到你的 Github 仓库,并在 Vercel 面板中创建项目。选择 `New project`,然后导入对应的 Github 仓库,填写环境变量,选择 `Remix` 框架,点击 `Deploy`,等待部署完成。
|
||||
|
||||
部署完后继续点击 Countinu to Dashboard,进入 Settings -> General,修改下面设置:
|
||||
|
||||

|
||||

|
||||
|
||||
**然后进入 Deployments 重新部署一次,或向 github 推送代码重新触发部署**。
|
||||
|
||||
**fly.io:**
|
||||
|
||||
```bash
|
||||
cd vmail/apps/remix
|
||||
fly launch
|
||||
```
|
||||
|
||||
**5.部署成功后在 cloudflare 添加域名解析(A记录)到对应平台,就可以愉快的玩耍了**
|
||||
|
||||
vercel 演示如何解析:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
以上,完成!
|
||||
|
||||
### 发送邮件步骤
|
||||
|
||||
**1.在 Cloudflare 控制台中添加域名DNS解析**
|
||||
|
||||
手打中...
|
||||
查看 [send-tutorial.md](/docs/send-tutorial.md)
|
||||
|
||||
## 🔨 本地运行调试
|
||||
|
||||
|
||||
+5
-129
@@ -1,6 +1,6 @@
|
||||
<div align="center">
|
||||
<h1>𝐕𝐌𝐀𝐈𝐋.𝐃𝐄𝐕</h1>
|
||||
<p>English | <a href="/README.md">简体中文</a></p>
|
||||
<p><a href="https://discord.gg/d68kWCBDEs">Discord</a> · English | <a href="/README.md">简体中文</a></p>
|
||||
<p>Temporary email service build with email worker.</p>
|
||||
<img src="https://img.inke.app/file/beb0212f96c6cd37eaeb8.jpg"/>
|
||||
</div>
|
||||
@@ -28,137 +28,13 @@ Principles:
|
||||
- [turso](https://turso.tech) sqlite (a free plan available for personal use)
|
||||
- [Vercel](https://vercel.com) or [fly.io](https://fly.io) to deploy Remix app
|
||||
|
||||
### Steps
|
||||
### Receiving Emails steps
|
||||
|
||||
**1.Register a [turso](https://turso.tech) account, create a database, and create an emails table**
|
||||
See [receive-tutorial-en.md](/docs//receive-tutorial-en.md)
|
||||
|
||||
After registration, you will be prompted to create a database. I named it `vmail` here,
|
||||
### Sending Emails steps
|
||||
|
||||

|
||||
|
||||
Then, Create a table named `emails`. Select your database, you will see the "Edit Tables" button, click and enter.
|
||||
|
||||

|
||||
|
||||
> ⚠️ Note: **There is a plus button in the upper left corner, and I tried to click it without any prompts or effects, so I used the cli provided by turso to initialize the table.**
|
||||
|
||||
Cli documents: https://docs.turso.tech/cli/introduction
|
||||
|
||||
For Linux (or mac/windows):
|
||||
|
||||
```bash
|
||||
# Install (Remember to restart the terminal after installation)
|
||||
curl -sSfL https://get.tur.so/install.sh | bash
|
||||
|
||||
# Authenticate
|
||||
turso auth login
|
||||
|
||||
# Connect to your Turso database
|
||||
turso db shell <database-name>
|
||||
|
||||
# Copy sql script to run on the terminal (packages/database/drizzle/0000_sturdy_arclight.sql)
|
||||
CREATE TABLE `emails` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`message_from` text NOT NULL,
|
||||
`message_to` text NOT NULL,
|
||||
`headers` text NOT NULL,
|
||||
`from` text NOT NULL,
|
||||
`sender` text,
|
||||
`reply_to` text,
|
||||
`delivered_to` text,
|
||||
`return_path` text,
|
||||
`to` text,
|
||||
`cc` text,
|
||||
`bcc` text,
|
||||
`subject` text,
|
||||
`message_id` text NOT NULL,
|
||||
`in_reply_to` text,
|
||||
`references` text,
|
||||
`date` text,
|
||||
`html` text,
|
||||
`text` text,
|
||||
`created_at` integer NOT NULL,
|
||||
`updated_at` integer NOT NULL
|
||||
);
|
||||
```
|
||||
|
||||
**2.Deploy email workers**
|
||||
|
||||
```bash
|
||||
git clone https://github.com/yesmore/vmail
|
||||
|
||||
cd vmail
|
||||
|
||||
# Install dependencies
|
||||
pnpm install
|
||||
```
|
||||
|
||||
Fill in the necessary environment variables in `vmail/apps/email-worker/wrangler.toml` file.
|
||||
|
||||
- TURSO_DB_AUTH_TOKEN (turso table info from step 1,click `Generate Token`)
|
||||
- TURSO_DB_URL (e.g. libsql://db-name.turso.io)
|
||||
- EMAIL_DOMAIN (e.g. vmail.dev)
|
||||
|
||||
> If you don't do this step, you can add environment variables in the worker settings of Cloudflare
|
||||
|
||||
Then run cmds:
|
||||
|
||||
```bash
|
||||
cd apps/email-worker
|
||||
|
||||
# Node environment required, and your need to install wrangler cli and login first, see https://developers.cloudflare.com/workers/wrangler/install-and-update
|
||||
pnpm run deploy
|
||||
```
|
||||
|
||||
**3.Configure email routing rules**
|
||||
|
||||
Set `Catch-all` action to Send to Worker
|
||||
|
||||

|
||||
|
||||
**4.Deploy Remix app on Vercel or fly.io**
|
||||
|
||||
Ensure that the following environment variables (`.env.example`) are prepared and filled in during deployment:
|
||||
|
||||
| Variable | Description | example |
|
||||
| ---------------------- | ------------------------------------------------------------------ | -------------------------------------- |
|
||||
| COOKIES_SECRET | The encryption secret of the cookie, a random string is sufficient | `s3cr3t` |
|
||||
| TURNSTILE_KEY | Obtained from Cloudflare for website verification | `1234567890` |
|
||||
| TURNSTILE_SECRET | Obtained from Cloudflare for website verification | `s3cr3t` |
|
||||
| TURSO_DB_RO_AUTH_TOKEN | Obtain database credentials from turso | `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9` |
|
||||
| TURSO_DB_URL | Obtain database credentials from turso | `libsql://db-name.turso.io` |
|
||||
| EMAIL_DOMAIN | email domain | `vmail.dev` |
|
||||
| EXPIRY_TIME | optional, default `86400` | `86400` |
|
||||
|
||||
**For Vercel:**
|
||||
|
||||
Deploy your own version of email to Vercel with one click:
|
||||
|
||||
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Foiov%2Fvmail&env=COOKIES_SECRET&env=TURNSTILE_KEY&env=TURNSTILE_SECRET&env=TURSO_DB_RO_AUTH_TOKEN&env=TURSO_DB_URL&env=EMAIL_DOMAIN&project-name=vmail&repository-name=vmail)
|
||||
|
||||
Or push the code to your Github repository and create a new project in Vercel. Choose `New project`, then import the corresponding Github repository, fill in the environment variables, select the `Remix` framework, and click `Deploy`. Wait for the deployment to complete.
|
||||
|
||||
Click Couninue to Dashboard -> Settings -> General:
|
||||
|
||||

|
||||

|
||||
|
||||
**For fly.io:**
|
||||
|
||||
```bash
|
||||
cd vmail/apps/remix
|
||||
fly launch
|
||||
```
|
||||
|
||||
**5.Add DNS records (A record) to the corresponding platform in Cloudflare**
|
||||
|
||||
e.g. vercel:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Done!
|
||||
See [send-tutorial-en.md](/docs/send-tutorial-en.md)
|
||||
|
||||
## Local development
|
||||
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
## Receive email steps
|
||||
|
||||
**1.Register a [turso](https://turso.tech) account, create a database, and create an emails table**
|
||||
|
||||
After registration, you will be prompted to create a database. I named it `vmail` here,
|
||||
|
||||

|
||||
|
||||
Then, Create a table named `emails`. Select your database, you will see the "Edit Tables" button, click and enter.
|
||||
|
||||

|
||||
|
||||
> ⚠️ Note: **There is a plus button in the upper left corner, and I tried to click it without any prompts or effects, so I used the cli provided by turso to initialize the table.**
|
||||
|
||||
Cli documents: https://docs.turso.tech/cli/introduction
|
||||
|
||||
For Linux (or mac/windows):
|
||||
|
||||
```bash
|
||||
# Install (Remember to restart the terminal after installation)
|
||||
curl -sSfL https://get.tur.so/install.sh | bash
|
||||
|
||||
# Authenticate
|
||||
turso auth login
|
||||
|
||||
# Connect to your Turso database
|
||||
turso db shell <database-name>
|
||||
|
||||
# Copy sql script to run on the terminal (packages/database/drizzle/0000_sturdy_arclight.sql)
|
||||
CREATE TABLE `emails` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`message_from` text NOT NULL,
|
||||
`message_to` text NOT NULL,
|
||||
`headers` text NOT NULL,
|
||||
`from` text NOT NULL,
|
||||
`sender` text,
|
||||
`reply_to` text,
|
||||
`delivered_to` text,
|
||||
`return_path` text,
|
||||
`to` text,
|
||||
`cc` text,
|
||||
`bcc` text,
|
||||
`subject` text,
|
||||
`message_id` text NOT NULL,
|
||||
`in_reply_to` text,
|
||||
`references` text,
|
||||
`date` text,
|
||||
`html` text,
|
||||
`text` text,
|
||||
`created_at` integer NOT NULL,
|
||||
`updated_at` integer NOT NULL
|
||||
);
|
||||
```
|
||||
|
||||
**2.Deploy email workers**
|
||||
|
||||
```bash
|
||||
git clone https://github.com/yesmore/vmail
|
||||
|
||||
cd vmail
|
||||
|
||||
# Install dependencies
|
||||
pnpm install
|
||||
```
|
||||
|
||||
Fill in the necessary environment variables in `vmail/apps/email-worker/wrangler.toml` file.
|
||||
|
||||
- TURSO_DB_AUTH_TOKEN (turso table info from step 1,click `Generate Token`)
|
||||
- TURSO_DB_URL (e.g. libsql://db-name.turso.io)
|
||||
- EMAIL_DOMAIN (e.g. vmail.dev)
|
||||
|
||||
> If you don't do this step, you can add environment variables in the worker settings of Cloudflare
|
||||
|
||||
Then run cmds:
|
||||
|
||||
```bash
|
||||
cd apps/email-worker
|
||||
|
||||
# Node environment required, and your need to install wrangler cli and login first, see https://developers.cloudflare.com/workers/wrangler/install-and-update
|
||||
pnpm run deploy
|
||||
```
|
||||
|
||||
**3.Configure email routing rules**
|
||||
|
||||
Set `Catch-all` action to Send to Worker
|
||||
|
||||

|
||||
|
||||
**4.Deploy Remix app on Vercel or fly.io**
|
||||
|
||||
Ensure that the following environment variables (`.env.example`) are prepared and filled in during deployment:
|
||||
|
||||
| Variable | Description | example |
|
||||
| ---------------------- | ------------------------------------------------------------------ | -------------------------------------- |
|
||||
| COOKIES_SECRET | The encryption secret of the cookie, a random string is sufficient | `s3cr3t` |
|
||||
| TURNSTILE_KEY | Obtained from Cloudflare for website verification | `1234567890` |
|
||||
| TURNSTILE_SECRET | Obtained from Cloudflare for website verification | `s3cr3t` |
|
||||
| TURSO_DB_RO_AUTH_TOKEN | Obtain database credentials from turso | `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9` |
|
||||
| TURSO_DB_URL | Obtain database credentials from turso | `libsql://db-name.turso.io` |
|
||||
| EMAIL_DOMAIN | email domain | `vmail.dev` |
|
||||
| EXPIRY_TIME | optional, default `86400` | `86400` |
|
||||
|
||||
**For Vercel:**
|
||||
|
||||
Deploy your own version of email to Vercel with one click:
|
||||
|
||||
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Foiov%2Fvmail&env=COOKIES_SECRET&env=TURNSTILE_KEY&env=TURNSTILE_SECRET&env=TURSO_DB_RO_AUTH_TOKEN&env=TURSO_DB_URL&env=EMAIL_DOMAIN&project-name=vmail&repository-name=vmail)
|
||||
|
||||
Or push the code to your Github repository and create a new project in Vercel. Choose `New project`, then import the corresponding Github repository, fill in the environment variables, select the `Remix` framework, and click `Deploy`. Wait for the deployment to complete.
|
||||
|
||||
Click Couninue to Dashboard -> Settings -> General:
|
||||
|
||||

|
||||

|
||||
|
||||
**For fly.io:**
|
||||
|
||||
```bash
|
||||
cd vmail/apps/remix
|
||||
fly launch
|
||||
```
|
||||
|
||||
**5.Add DNS records (A record) to the corresponding platform in Cloudflare**
|
||||
|
||||
e.g. vercel:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Done!
|
||||
@@ -0,0 +1,140 @@
|
||||
## 接收邮件部署教程
|
||||
|
||||
**1.注册一个 [turso](https://turso.tech) 账户,创建数据库,并创建一个`emails`表**
|
||||
|
||||
注册后,系统会提示您创建一个数据库。在这里我将其命名为 `vmail`,
|
||||
|
||||

|
||||
|
||||
然后,创建一个名为 `emails` 的表。
|
||||
|
||||
选择您的数据库,您会看到“编辑表”按钮,点击并进入:
|
||||
|
||||

|
||||
|
||||
> ⚠️ 注意:**左上角有一个加号按钮,我尝试点击它没有任何提示或效果,所以我使用了 turso 提供的 cli 来初始化表。**
|
||||
|
||||
Cli 文档:https://docs.turso.tech/cli/introduction
|
||||
|
||||
Linux (或 mac/windows) 终端执行:
|
||||
|
||||
```bash
|
||||
# 安装(安装后记得重启终端生效)
|
||||
curl -sSfL https://get.tur.so/install.sh | bash
|
||||
|
||||
# 登录账户
|
||||
turso auth login
|
||||
|
||||
# 连接到您的Turso数据库
|
||||
turso db shell <database-name>
|
||||
```
|
||||
|
||||
将sql脚本复制到终端运行(packages/database/drizzle/0000_sturdy_arclight.sql)
|
||||
|
||||
<details>
|
||||
<summary>查看脚本内容</summary>
|
||||
<pre ><code>CREATE TABLE `emails` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`message_from` text NOT NULL,
|
||||
`message_to` text NOT NULL,
|
||||
`headers` text NOT NULL,
|
||||
`from` text NOT NULL,
|
||||
`sender` text,
|
||||
`reply_to` text,
|
||||
`delivered_to` text,
|
||||
`return_path` text,
|
||||
`to` text,
|
||||
`cc` text,
|
||||
`bcc` text,
|
||||
`subject` text,
|
||||
`message_id` text NOT NULL,
|
||||
`in_reply_to` text,
|
||||
`references` text,
|
||||
`date` text,
|
||||
`html` text,
|
||||
`text` text,
|
||||
`created_at` integer NOT NULL,
|
||||
`updated_at` integer NOT NULL
|
||||
);
|
||||
</code></pre>
|
||||
</details>
|
||||
|
||||
**2.部署 email worker**
|
||||
|
||||
```bash
|
||||
git clone https://github.com/yesmore/vmail
|
||||
|
||||
cd vmail
|
||||
|
||||
# 安装依赖
|
||||
pnpm install
|
||||
```
|
||||
|
||||
在 `vmail/apps/email-worker/wrangler.toml` 文件中填写必要的环境变量。
|
||||
|
||||
- TURSO_DB_AUTH_TOKEN(第1步中的turso表信息,点击“Generate Token”)
|
||||
- TURSO_DB_URL(例如 libsql://db-name.turso.io)
|
||||
- EMAIL_DOMAIN (域名,如 vmail.dev)
|
||||
|
||||
> 如果您不执行此步骤,可以在Cloudflare的 worker settings 中添加环境变量
|
||||
|
||||
然后运行命令:
|
||||
|
||||
```bash
|
||||
cd apps/email-worker
|
||||
|
||||
# 需要 Node 环境,并且需要安装 wrangler cli 并在本地登录,参考 https://developers.cloudflare.com/workers/wrangler/install-and-update
|
||||
pnpm run deploy
|
||||
```
|
||||
|
||||
**3.配置电子邮件路由规则**
|
||||
|
||||
设置“Catch-all”操作为发送到 email worker:
|
||||
|
||||

|
||||
|
||||
**4.在 Vercel 或 fly.io 上部署 Remix 应用程序**
|
||||
|
||||
确保在部署期间准备并填写以下环境变量(`.env.example`):
|
||||
|
||||
| 变量名 | 说明 | 示例 |
|
||||
| ---------------------- | ------------------------------------ | --------------------------- |
|
||||
| COOKIES_SECRET | 必填,cookie加密密钥 | `my-secret-key` |
|
||||
| TURNSTILE_KEY | 必填,网站验证所需的Turnstile Key | `my-turnstile-key` |
|
||||
| TURNSTILE_SECRET | 必填,网站验证所需的Turnstile Secret | `my-turnstile-secret` |
|
||||
| TURSO_DB_RO_AUTH_TOKEN | 必填,turso数据库只读凭据 | `my-turso-db-ro-auth-token` |
|
||||
| TURSO_DB_URL | 必填,turso数据库URL | `libsql://db-name.turso.io` |
|
||||
| EMAIL_DOMAIN | 必填,域名后缀 | `vmail.dev` |
|
||||
| EXPIRY_TIME | 可选,过期时间,单位秒,默认86400 | `86400` |
|
||||
|
||||
**Vercel:**
|
||||
|
||||
推荐使用一键部署按钮(一步 `fork + deploy` 此仓库):
|
||||
|
||||
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Foiov%2Fvmail&env=COOKIES_SECRET&env=TURNSTILE_KEY&env=TURNSTILE_SECRET&env=TURSO_DB_RO_AUTH_TOKEN&env=TURSO_DB_URL&env=EMAIL_DOMAIN&project-name=vmail&repository-name=vmail)
|
||||
|
||||
或手动将代码推送到你的 Github 仓库,并在 Vercel 面板中创建项目。选择 `New project`,然后导入对应的 Github 仓库,填写环境变量,选择 `Remix` 框架,点击 `Deploy`,等待部署完成。
|
||||
|
||||
部署完后继续点击 Countinu to Dashboard,进入 Settings -> General,修改下面设置:
|
||||
|
||||

|
||||

|
||||
|
||||
**然后进入 Deployments 重新部署一次,或向 github 推送代码重新触发部署**。
|
||||
|
||||
**fly.io:**
|
||||
|
||||
```bash
|
||||
cd vmail/apps/remix
|
||||
fly launch
|
||||
```
|
||||
|
||||
**5.部署成功后在 cloudflare 添加域名解析(A记录)到对应平台,就可以愉快的玩耍了**
|
||||
|
||||
vercel 演示如何解析:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
以上,完成!
|
||||
@@ -0,0 +1,3 @@
|
||||
## Send email steps
|
||||
|
||||
> working...
|
||||
@@ -0,0 +1,3 @@
|
||||
## 发送邮件部署教程
|
||||
|
||||
手打中...
|
||||
Reference in new issue
Block a user