brainy/deploy/models-cdn/wrangler.toml
David Snelling 1096d285f5 feat: Add Google Cloud Storage CDN for models.soulcraft.com
- Primary source: models.soulcraft.com on GCS
- Backup: GitHub releases
- Fallback: Hugging Face
- Immutable with SHA256 verification
2025-08-18 18:58:26 -07:00

34 lines
No EOL
746 B
TOML

name = "brainy-models-cdn"
main = "src/index.ts"
compatibility_date = "2024-01-01"
# Custom domain
routes = [
{ pattern = "models.soulcraft.com/*", zone_name = "soulcraft.com" }
]
# KV namespace for model storage
kv_namespaces = [
{ binding = "MODELS", id = "brainy_models_kv" }
]
# R2 bucket for large model files
r2_buckets = [
{ binding = "MODEL_BUCKET", bucket_name = "brainy-models" }
]
[env.production]
vars = { ENVIRONMENT = "production" }
# Cache everything for 1 year (models never change)
[site]
bucket = "./models"
[build]
command = "npm install && npm run build"
# Durable Objects for download tracking
[[durable_objects.bindings]]
name = "DOWNLOAD_TRACKER"
class_name = "DownloadTracker"
script_name = "download-tracker"