forked from TheMarketingCompany/TMC-File-Transfer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.wrangler.toml
More file actions
66 lines (55 loc) · 2.21 KB
/
example.wrangler.toml
File metadata and controls
66 lines (55 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name = "your-project-name"
compatibility_date = "2024-08-21"
# Pages configuration
pages_build_output_dir = "./dist"
# Environment variables
[env.production.vars]
ENVIRONMENT = "production"
MAX_FILE_SIZE = "5368709120" # 5GB in bytes (supports large files via multipart upload)
ALLOWED_ORIGINS = "https://your-domain.pages.dev"
TURNSTILE_SITE_KEY = "your_turnstile_site_key_here"
TURNSTILE_SECRET_KEY = "your_turnstile_secret_key_here"
CLOUDFLARE_ZONE_ID = "your_zone_id_here"
MIGRATION_AUTH_TOKEN = "your_migration_auth_token_here"
CLEANUP_SECRET = "your_cleanup_secret_here"
# D1 Database binding for production
[[env.production.d1_databases]]
binding = "DB"
database_name = "your-database-name"
database_id = "your-database-id-here"
# R2 Storage binding for production
[[env.production.r2_buckets]]
binding = "TRANSFER_BUCKET"
bucket_name = "your-bucket-name"
[env.preview.vars]
ENVIRONMENT = "preview"
MAX_FILE_SIZE = "5368709120" # 5GB in bytes (supports large files via multipart upload)
ALLOWED_ORIGINS = "*"
TURNSTILE_SITE_KEY = "1x00000000000000000000AA" # Test key for preview
TURNSTILE_SECRET_KEY = "1x0000000000000000000000000000000AA" # Test key for preview
MIGRATION_AUTH_TOKEN = "your_migration_auth_token_here"
CLEANUP_SECRET = "your_cleanup_secret_here"
# D1 Database binding for preview
[[env.preview.d1_databases]]
binding = "DB"
database_name = "your-database-name"
database_id = "your-database-id-here"
# R2 Storage binding for preview
[[env.preview.r2_buckets]]
binding = "TRANSFER_BUCKET"
bucket_name = "your-bucket-name"
# KV namespace for caching (optional)
#[[kv_namespaces]]
#binding = "CACHE"
#id = "your-kv-namespace-id"
#preview_id = "your-kv-preview-id"
# Analytics Engine for logging (commented out - needs setup)
#[[analytics_engine_datasets]]
#binding = "ANALYTICS"
#dataset = "tmc_file_transfer_logs"
# Cleanup Worker Configuration
# The cleanup worker is deployed separately using the shared configuration below
# Run: npm run deploy:cleanup or npm run deploy:cleanup:preview
# Note: Pages doesn't support [limits], [build], [[rules]], headers, or caching sections
# These are handled via _headers and _redirects files in the dist folder
# See: https://developers.cloudflare.com/pages/configuration/headers/