Skip to content

HatsuboshiTechClub/youbin

Repository files navigation

youbin

あなたのための郵便屋さん

Deploy to Cloudflare

~/.config/youbin/config.toml

jwt_private_key_dir = "/home/idolm/.config/youbin/keys"
output_json_lines = true

[cloudflare]
account_id = "0123456789abcdef0123456789abcdef"
api_token_file = "/home/idolm/.config/youbin/cloudflare-api-token"
d1_database_id = "00000000-0000-0000-0000-000000000000"
environment = "prod"
inbound_queue_id = "11111111111111111111111111111111"
worker_name = "youbin"

[api]
base_url = "https://youbin.example.com"
jwt_path = "/home/idolm/.config/youbin/tokens/wrapper-prod-2026-05.jwt"
request_timeout_seconds = 30

[smtp]
hostname = "smtp.example.com"
listen_addr = "0.0.0.0:587"

[smtp.tls]
cert_path = "/etc/letsencrypt/live/smtp.example.com/fullchain.pem"
key_path = "/etc/letsencrypt/live/smtp.example.com/privkey.pem"

[imap]
hostname = "imap.example.com"
listen_addr = "0.0.0.0:993"

[imap.tls]
cert_path = "/etc/letsencrypt/live/imap.example.com/fullchain.pem"
key_path = "/etc/letsencrypt/live/imap.example.com/privkey.pem"

[observability]
json_logs = true
log_level = "info"

workers/youbin/wrangler.toml

name = "youbin"
main = "src/index.ts"
compatibility_date = "2026-05-21"
workers_dev = true

[secrets]
required = ["URL_SIGNING_SECRET"]

[[d1_databases]]
binding = "DB"
database_name = "youbin-prod"
database_id = "00000000-0000-0000-0000-000000000000"

[[r2_buckets]]
binding = "RAW_MAIL"
bucket_name = "youbin-prod-raw-mail"

[[r2_buckets]]
binding = "ATTACHMENTS"
bucket_name = "youbin-prod-attachments"

[[r2_buckets]]
binding = "SEARCH_DOCUMENTS"
bucket_name = "youbin-prod-search-documents"

[[ai_search]]
binding = "AI_SEARCH"
instance_name = "youbin-prod-search"

[[send_email]]
name = "EMAIL"

[triggers]
crons = ["*/5 * * * *"]

[[queues.producers]]
binding = "INBOUND_QUEUE"
queue = "youbin-prod-inbound"

[[queues.consumers]]
queue = "youbin-prod-inbound"
max_batch_size = 10
max_batch_timeout = 30
max_retries = 5

[[durable_objects.bindings]]
name = "MAILBOX_EVENTS"
class_name = "MailboxEvents"

[[migrations]]
tag = "v1"
new_sqlite_classes = ["MailboxEvents"]

[env.prod]
name = "youbin"
workers_dev = false

[env.prod.secrets]
required = ["URL_SIGNING_SECRET"]

[env.prod.triggers]
crons = ["*/5 * * * *"]

[[env.prod.d1_databases]]
binding = "DB"
database_name = "youbin-prod"
database_id = "00000000-0000-0000-0000-000000000000"

[[env.prod.r2_buckets]]
binding = "RAW_MAIL"
bucket_name = "youbin-prod-raw-mail"

[[env.prod.r2_buckets]]
binding = "ATTACHMENTS"
bucket_name = "youbin-prod-attachments"

[[env.prod.r2_buckets]]
binding = "SEARCH_DOCUMENTS"
bucket_name = "youbin-prod-search-documents"

[[env.prod.ai_search]]
binding = "AI_SEARCH"
instance_name = "youbin-prod-search"

[[env.prod.send_email]]
name = "EMAIL"

[[env.prod.queues.producers]]
binding = "INBOUND_QUEUE"
queue = "youbin-prod-inbound"

[[env.prod.queues.consumers]]
queue = "youbin-prod-inbound"
max_batch_size = 10
max_batch_timeout = 30
max_retries = 5

[[env.prod.durable_objects.bindings]]
name = "MAILBOX_EVENTS"
class_name = "MailboxEvents"

[[env.prod.migrations]]
tag = "v1"
new_sqlite_classes = ["MailboxEvents"]

About

あなたのための郵便屋さん

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors