Files
zmail/wrangler.toml

38 lines
1.0 KiB
TOML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name = "zmail"
main = "worker/src/index.ts"
# 打包配置
minify = true # 生产环境压缩代码
compatibility_flags = [ "nodejs_compat" ]
compatibility_date = "2025-03-01"
keep_vars = true
# 启用 D1 数据库
# 注意:这里的 binding 是固定的 "DB",database_name 和 database_id 将由 GitHub Action 动态替换
[[d1_databases]]
binding = "DB"
database_name = "${D1_DATABASE_NAME}" # 这是 D1 数据库名称的占位符
database_id = "${D1_DATABASE_ID}" # 这是 D1 数据库 ID 的占位符
# 设置域名
# 注意:这里的 VITE_EMAIL_DOMAIN 将由 GitHub Action 动态替换
[vars]
VITE_EMAIL_DOMAIN = "${VITE_EMAIL_DOMAIN}" # 这是邮箱域名的占位符
# 配置邮件处理
[triggers]
crons = ["0 * * * *"] # 每小时运行一次清理任务
[build]
command = "pnpm run build"
[assets]
binding = "ASSETS"
directory = "frontend/dist"
not_found_handling = "single-page-application"
# 默认开启日志,方便调试
[observability]
enabled = false
head_sampling_rate = 1 # optional. default = 1.