mirror of
https://github.com/saltbo/zpan.git
synced 2026-08-29 00:01:42 +08:00
70 lines
1.8 KiB
TOML
70 lines
1.8 KiB
TOML
name = "zpan"
|
|
main = "./workers/bootstrap.ts"
|
|
compatibility_date = "2026-04-12"
|
|
compatibility_flags = ["nodejs_compat"]
|
|
|
|
[assets]
|
|
binding = "ASSETS"
|
|
not_found_handling = "single-page-application"
|
|
run_worker_first = ["/api/*", "/dav", "/dav/*", "/r/*", "/s/*"]
|
|
|
|
[[d1_databases]]
|
|
binding = "DB"
|
|
database_name = "zpan-db"
|
|
database_id = "5bd64957-fa49-4da0-8b7b-6e0ad84037e7"
|
|
migrations_dir = "./migrations"
|
|
|
|
# Public-bucket for avatars / org logos / future system-level public assets.
|
|
# The deploy workflow provisions this bucket on first run, enables its managed
|
|
# public URL, and writes PUBLIC_IMAGES_URL to the Worker's secret store.
|
|
[[r2_buckets]]
|
|
binding = "PUBLIC_IMAGES"
|
|
bucket_name = "zpan-public-images"
|
|
|
|
[[send_email]]
|
|
name = "EMAIL"
|
|
|
|
[[queues.producers]]
|
|
binding = "ARCHIVE_QUEUE"
|
|
queue = "zpan-archive-jobs"
|
|
|
|
[[queues.consumers]]
|
|
queue = "zpan-archive-jobs"
|
|
max_batch_size = 1
|
|
max_batch_timeout = 1
|
|
max_retries = 3
|
|
|
|
[observability]
|
|
enabled = true
|
|
|
|
[triggers]
|
|
crons = ["*/10 * * * *", "0 */6 * * *"]
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# Staging environment — used by non-production branch builds.
|
|
# CLOUDFLARE_ENV=staging is set automatically in the build script.
|
|
# Workers Builds creates preview versions on the same zpan Worker
|
|
# but with staging D1 binding.
|
|
# ----------------------------------------------------------------------------
|
|
[env.staging]
|
|
|
|
[[env.staging.d1_databases]]
|
|
binding = "DB"
|
|
database_name = "zpan-db-staging"
|
|
database_id = "a9197d7a-6524-42f0-b646-e714dcb30b3b"
|
|
migrations_dir = "./migrations"
|
|
|
|
[[env.staging.r2_buckets]]
|
|
binding = "PUBLIC_IMAGES"
|
|
bucket_name = "zpan-public-images-staging"
|
|
|
|
[[env.staging.queues.producers]]
|
|
binding = "ARCHIVE_QUEUE"
|
|
queue = "zpan-archive-jobs-staging"
|
|
|
|
[[env.staging.queues.consumers]]
|
|
queue = "zpan-archive-jobs-staging"
|
|
max_batch_size = 1
|
|
max_batch_timeout = 1
|
|
max_retries = 3
|