-
Notifications
You must be signed in to change notification settings - Fork 9
/
wrangler.toml
50 lines (43 loc) · 1.83 KB
/
wrangler.toml
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
name = "cdn3-dev"
main = "src/index.ts"
compatibility_date = "2023-05-10"
compatibility_flags = ["nodejs_compat"]
logpush = true
# Specifies the r2 buckets. r2 bucket names are scoped to your account (not global). The buckets should be publicly inaccessible.
r2_buckets = [
{ binding = "ATTACHMENT_BUCKET", bucket_name = "attachments-staging", preview_bucket_name = "attachments-staging" },
{ binding = "BACKUP_BUCKET", bucket_name = "backups-staging", preview_bucket_name = "backups-staging" }
]
durable_objects.bindings = [
{ name = "ATTACHMENT_UPLOAD_HANDLER", class_name = "AttachmentUploadHandler" },
{ name = "BACKUP_UPLOAD_HANDLER", class_name = "BackupUploadHandler" }
]
[[migrations]]
tag = "v1"
new_classes = ["UploadHandler"]
[[migrations]]
tag = "v2"
renamed_classes = [{ from = "UploadHandler", to = "AttachmentUploadHandler" }]
new_classes = ["BackupUploadHandler"]
[env.production]
name = "cdn3"
durable_objects.bindings = [
{ name = "ATTACHMENT_UPLOAD_HANDLER", class_name = "AttachmentUploadHandler" },
{ name = "BACKUP_UPLOAD_HANDLER", class_name = "BackupUploadHandler" }
]
r2_buckets = [
{ binding = "ATTACHMENT_BUCKET", bucket_name = "attachments", preview_bucket_name = "attachments" },
{ binding = "BACKUP_BUCKET", bucket_name = "backups", preview_bucket_name = "backups" }
]
[env.staging]
name = "cdn3-staging"
durable_objects.bindings = [
{ name = "ATTACHMENT_UPLOAD_HANDLER", class_name = "AttachmentUploadHandler" },
{ name = "BACKUP_UPLOAD_HANDLER", class_name = "BackupUploadHandler" }
]
r2_buckets = [
{ binding = "ATTACHMENT_BUCKET", bucket_name = "attachments-staging", preview_bucket_name = "attachments-staging" },
{ binding = "BACKUP_BUCKET", bucket_name = "backups-staging", preview_bucket_name = "backups-staging" }
]
# To set an auth secret,
# wrangler secrets put SHARED_AUTH_SECRET