81 lines
2.3 KiB
TOML
81 lines
2.3 KiB
TOML
name = "telegram-ai-support"
|
|
main = "src/index.ts"
|
|
compatibility_date = "2024-01-01"
|
|
|
|
[ai]
|
|
binding = "AI"
|
|
|
|
[vars]
|
|
ENVIRONMENT = "production"
|
|
# AI Gateway 경유
|
|
OPENAI_API_BASE = "https://gateway.ai.cloudflare.com/v1/d8e5997eb4040f8b489f09095c0f623c/telegram-ai-support/openai"
|
|
# Kroki 다이어그램 서비스 (Mermaid/D2 등 → HAProxy)
|
|
KROKI_URL = "https://kroki.inouter.com"
|
|
# 외부 API
|
|
NAMECHEAP_API_URL = "https://namecheap.api.inouter.com"
|
|
WHOIS_API_URL = "https://whois-api-kappa-inoutercoms-projects.vercel.app"
|
|
CLOUD_ORCHESTRATOR_URL = "https://cloud-orchestrator.kappa-d8e.workers.dev"
|
|
|
|
[[d1_databases]]
|
|
binding = "DB"
|
|
database_name = "telegram-ai-support"
|
|
database_id = "2b45a1b2-19c4-4730-b608-9fc3b4e64483"
|
|
|
|
[[kv_namespaces]]
|
|
binding = "RATE_LIMIT_KV"
|
|
id = "15bcdcbde94046fe936c89b2e7d85b64"
|
|
preview_id = "0d3af750739e40d4a0324889564d74a7"
|
|
|
|
[[kv_namespaces]]
|
|
binding = "SESSION_KV"
|
|
id = "24ee962396cc4e9ab1fb47ceacf62c7d"
|
|
preview_id = "302ad556567447cbac49c20bded4eb7e"
|
|
|
|
[[kv_namespaces]]
|
|
binding = "CACHE_KV"
|
|
id = "39a04e54198545ae9c3e4b198a13afe3"
|
|
preview_id = "5fc5438248a24e92a49e13fde6062d7a"
|
|
|
|
[[r2_buckets]]
|
|
binding = "R2_BUCKET"
|
|
bucket_name = "ai-support-assets"
|
|
|
|
# Service Binding
|
|
[[services]]
|
|
binding = "CLOUD_ORCHESTRATOR"
|
|
service = "cloud-orchestrator"
|
|
|
|
# Vectorize (RAG semantic search)
|
|
# Create index: npx wrangler vectorize create knowledge-embeddings --dimensions=768 --metric=cosine
|
|
[[vectorize]]
|
|
binding = "VECTORIZE"
|
|
index_name = "knowledge-embeddings"
|
|
|
|
# Cron Triggers:
|
|
# - 매일 자정(KST): 만료 알림 + 데이터 아카이빙 + 정합성 검증
|
|
# - 매 5분: pending 상태 자동 정리
|
|
# - 매 시간: 장애 모니터링 체크
|
|
[triggers]
|
|
crons = ["0 15 * * *", "*/5 * * * *", "0 * * * *"]
|
|
|
|
# Cloudflare Queues: 태그 기반 범용 비동기 작업 큐
|
|
[[queues.producers]]
|
|
queue = "work-queue"
|
|
binding = "WORK_QUEUE"
|
|
|
|
[[queues.consumers]]
|
|
queue = "work-queue"
|
|
max_batch_size = 1
|
|
max_retries = 2
|
|
dead_letter_queue = "work-queue-dlq"
|
|
|
|
# Secrets (wrangler secret put):
|
|
# - BOT_TOKEN: Telegram Bot Token
|
|
# - WEBHOOK_SECRET: Webhook 검증용 시크릿
|
|
# - OPENAI_API_KEY: OpenAI API 키
|
|
# - NAMECHEAP_API_KEY: Namecheap API 래퍼 인증 키
|
|
# - ADMIN_TELEGRAM_IDS: 관리자 Telegram ID (콤마 구분)
|
|
# - DEPOSIT_BANK_NAME: 입금 은행명
|
|
# - DEPOSIT_BANK_ACCOUNT: 입금 계좌번호
|
|
# - DEPOSIT_BANK_HOLDER: 예금주
|