2024-01-16 14:38:05 +00:00
|
|
|
main = "src/index.ts"
|
|
|
|
compatibility_date = "2022-09-22"
|
|
|
|
|
|
|
|
[dev]
|
|
|
|
port = 8788
|
|
|
|
|
2024-07-01 14:32:14 +00:00
|
|
|
[[analytics_engine_datasets]]
|
2024-01-16 14:38:05 +00:00
|
|
|
binding = "MEASURE"
|
|
|
|
|
2024-07-01 14:32:14 +00:00
|
|
|
#################### Environment names ####################
|
|
|
|
# dev should never actually get deployed anywhere
|
|
|
|
[env.dev]
|
|
|
|
name = 'tldraw-assets-dev'
|
|
|
|
|
|
|
|
# we don't have a hard-coded name for preview. we instead have to generate it at build time and append it to this file.
|
|
|
|
|
|
|
|
# staging is the same as a preview on main:
|
2024-01-16 14:38:05 +00:00
|
|
|
[env.staging]
|
|
|
|
name = "main-tldraw-assets"
|
|
|
|
|
2024-07-01 14:32:14 +00:00
|
|
|
# production gets the proper name
|
|
|
|
[env.production]
|
|
|
|
name = "tldraw-assets"
|
|
|
|
|
|
|
|
#################### Assets R2 bucket ####################
|
|
|
|
# in dev, we write to the preview bucket and need a `preview_bucket_name`
|
|
|
|
[[env.dev.r2_buckets]]
|
2024-01-16 14:38:05 +00:00
|
|
|
binding = 'UPLOADS'
|
2024-07-01 14:32:14 +00:00
|
|
|
bucket_name = 'uploads-preview'
|
2024-01-16 14:38:05 +00:00
|
|
|
preview_bucket_name = 'uploads-preview'
|
|
|
|
|
2024-07-01 14:32:14 +00:00
|
|
|
# in preview and staging we write to the preview bucket
|
|
|
|
[[env.preview.r2_buckets]]
|
|
|
|
binding = 'UPLOADS'
|
|
|
|
bucket_name = 'uploads-preview'
|
2024-07-01 11:35:23 +00:00
|
|
|
|
2024-07-01 14:32:14 +00:00
|
|
|
[[env.stating.r2_buckets]]
|
|
|
|
binding = 'UPLOADS'
|
|
|
|
bucket_name = 'uploads-preview'
|
2024-01-16 14:38:05 +00:00
|
|
|
|
2024-07-01 14:32:14 +00:00
|
|
|
# in production, we write to the main bucket
|
|
|
|
[[env.production.r2_buckets]]
|
|
|
|
binding = "ROOMS"
|
|
|
|
bucket_name = "uploads"
|
2024-01-16 14:38:05 +00:00
|
|
|
|
2024-07-01 14:32:14 +00:00
|
|
|
#################### Analytics engine ####################
|
|
|
|
# analytics engine has the same configuration in all environments:
|
|
|
|
[[env.dev.analytics_engine_datasets]]
|
|
|
|
binding = "MEASURE"
|
2024-01-16 14:38:05 +00:00
|
|
|
|
2024-07-01 14:32:14 +00:00
|
|
|
[[env.preview.analytics_engine_datasets]]
|
|
|
|
binding = "MEASURE"
|
2024-01-16 14:38:05 +00:00
|
|
|
|
2024-07-01 14:32:14 +00:00
|
|
|
[[env.staging.analytics_engine_datasets]]
|
2024-07-01 11:35:23 +00:00
|
|
|
binding = "MEASURE"
|
|
|
|
|
2024-07-01 14:32:14 +00:00
|
|
|
[[env.production.analytics_engine_datasets]]
|
|
|
|
binding = "MEASURE"
|
2024-07-01 11:35:23 +00:00
|
|
|
|
2024-07-01 14:32:14 +00:00
|
|
|
#################### Routes ####################
|
|
|
|
# in production, we use a custom domain. others get a default *.tldraw.workers.dev domain
|
|
|
|
[[env.production.routes]]
|
|
|
|
pattern = 'assets.tldraw.xyz'
|
|
|
|
custom_domain = true
|
|
|
|
zone_name = 'tldraw.xyz'
|