-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathwrangler.toml
More file actions
182 lines (153 loc) · 5.88 KB
/
wrangler.toml
File metadata and controls
182 lines (153 loc) · 5.88 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# Anode Docworker - Cloudflare Worker Configuration
#
# To deploy your own worker:
# 1. Create D1 database: pnpm wrangler d1 create your-database-name
# 2. Update database_id below with the real ID from step 1
# 3. Optionally change the worker name
# 4. Deploy: pnpm wrangler deploy --env production
# 5. Set secrets: pnpm wrangler secret put {SECRET_NAME} --env production
# Default environment (local development for the all-in-one worker)
name = "anode-docworker"
main = "./backend/selective-entry.ts"
compatibility_date = "2025-05-08"
compatibility_flags = ["nodejs_compat"]
[dev]
port = 8787
[[durable_objects.bindings]]
name = "WEBSOCKET_SERVER"
class_name = "WebSocketServer"
[[migrations]]
tag = "v1"
new_sqlite_classes = ["WebSocketServer"]
[[d1_databases]]
binding = "DB"
database_name = "anode-docworker-dev-db"
# Local development uses local SQLite in .wrangler/ - database_id is ignored
database_id = "local"
[[r2_buckets]]
binding = "ARTIFACT_BUCKET"
bucket_name = "anode-artifacts-dev"
[vars]
# Environment variables for local development (`wrangler dev`)
# These are injected into the local worker process. The Vite dev server (`pnpm dev`)
# will pick up variables from the `.env` file. Ensure they match.
AUTH_ISSUER = "https://auth.stage.anaconda.com/api/auth"
DEPLOYMENT_ENV = "development"
SERVICE_PROVIDER = "local"
PERMISSIONS_PROVIDER = "anaconda"
EXTENSION_CONFIG = "{}"
ANACONDA_PROJECTS_URL = "https://stage.anaconda.com/api/projects"
EXTERNAL_OIDC_URL = "https://auth.stage.anaconda.com/api/auth"
# Cloudflare Access headers (optional, for local development)
# Set these in .dev.vars file (git-ignored) to test Cloudflare Access authentication locally
# CLOUDFLARE_SERVICE_TOKEN_CLIENT_ID = "your-client-id"
# CLOUDFLARE_SERVICE_TOKEN_CLIENT_SECRET = "your-client-secret"
VITE_LIVESTORE_SYNC_URL = "/livestore"
VITE_RUNTIME_COMMAND = "pnpm run dev:runtime"
VITE_AUTH_URI = "https://auth.stage.anaconda.com/api/auth"
VITE_AUTH_CLIENT_ID = "b7296d39-c1eb-49f4-b9a1-f36e6d5b8b6d"
VITE_AUTH_REDIRECT_URI = "http://localhost:5173/oidc"
VITE_AI_PROVIDER = "anaconda"
VITE_LS_DEV = "true"
VITE_USE_PROJECTS_ARTIFACTS = "true"
# ---
# Deployed Environments
# ---
# Legacy Production environment (worker only)
# This points to the original backend worker on pages.dev
[env.legacy]
name = "anode-docworker"
main = "./backend/sync.ts"
[[env.legacy.durable_objects.bindings]]
name = "WEBSOCKET_SERVER"
class_name = "WebSocketServer"
[[env.legacy.d1_databases]]
binding = "DB"
database_name = "anode-docworker-prototype-db"
database_id = "5339094f-f406-4236-97c3-ada460373f18"
[env.legacy.vars]
DEPLOYMENT_ENV = "production"
GOOGLE_CLIENT_ID = "94663405566-1go7jlpd2ar9u9urbfirmtjv1bm0tcis.apps.googleusercontent.com"
# New Production Environment (all-in-one worker)
[env.production]
name = "anode-main-prod"
main = "./backend/selective-entry.ts"
routes = [{ pattern = "app.runt.run", custom_domain = true }]
[env.production.assets]
directory = "./dist"
binding = "ASSETS"
[env.production.placement]
mode = "smart"
[[env.production.durable_objects.bindings]]
name = "WEBSOCKET_SERVER"
class_name = "WebSocketServer"
[[env.production.d1_databases]]
binding = "DB"
database_name = "anode-main-prod-db"
database_id = "4b4e903f-2bee-4ec0-8ac7-7ad2e3773929"
[[env.production.r2_buckets]]
binding = "ARTIFACT_BUCKET"
bucket_name = "anode-artifacts-prod"
[env.production.vars]
# Worker runtime variables
DEPLOYMENT_ENV = "production"
SERVICE_PROVIDER = "anaconda"
PERMISSIONS_PROVIDER = "anaconda"
ARTIFACT_STORAGE = "r2"
ARTIFACT_THRESHOLD = "16384"
AUTH_ISSUER = "https://auth.anaconda.com/api/auth"
ANACONDA_PROJECTS_URL = "https://anaconda.com/api/projects"
EXTENSION_CONFIG = '{"apiKeyUrl": "https://anaconda.com/api/iam/api-keys", "userinfoUrl": "https://auth.anaconda.com/api/auth/sessions/whoami"}'
# Vite build-time variables
VITE_LIVESTORE_SYNC_URL = "/livestore"
VITE_AUTH_URI = "https://auth.anaconda.com/api/auth"
VITE_AUTH_CLIENT_ID = "74a51ff4-5814-48fa-9ae7-6d3ef0aca3e2"
VITE_AUTH_REDIRECT_URI = "https://app.runt.run/oidc"
VITE_IFRAME_OUTPUT_URI = "https://runtusercontent.com"
VITE_AI_PROVIDER = "anaconda"
VITE_LS_DEV = "true"
VITE_USE_PROJECTS_ARTIFACTS = "true"
VITE_RUNTIME_COMMAND = "pnpm run dev:runtime"
# Preview Environment (all-in-one worker)
# Uses Workers build integration: pnpm build --mode preview + pnpm exec wrangler deploy --env preview
[env.preview]
name = "anode-docworker-preview"
main = "./backend/selective-entry.ts"
routes = [{ pattern = "preview.runt.run", custom_domain = true }]
[env.preview.assets]
directory = "./dist"
binding = "ASSETS"
[env.preview.placement]
mode = "smart"
[[env.preview.durable_objects.bindings]]
name = "WEBSOCKET_SERVER"
class_name = "WebSocketServer"
[[env.preview.d1_databases]]
binding = "DB"
database_name = "anode-docworker-preview-db"
database_id = "27286ef6-a078-4f8d-b1da-7c89033ff011"
[[env.preview.r2_buckets]]
binding = "ARTIFACT_BUCKET"
bucket_name = "anode-artifacts-preview"
preview_bucket_name = "anode-artifacts-preview"
[env.preview.vars]
# Worker runtime variables
DEPLOYMENT_ENV = "preview"
SERVICE_PROVIDER = "anaconda"
PERMISSIONS_PROVIDER = "anaconda"
ARTIFACT_STORAGE = "r2"
ARTIFACT_THRESHOLD = "16384"
AUTH_ISSUER = "https://auth.stage.anaconda.com/api/auth"
EXTENSION_CONFIG = '{"apiKeyUrl": "https://stage.anaconda.com/api/iam/api-keys", "userinfoUrl": "https://auth.stage.anaconda.com/api/auth/sessions/whoami"}'
# Vite build-time variables
VITE_LIVESTORE_SYNC_URL = "/livestore"
VITE_RUNTIME_COMMAND = "pnpm run dev:runtime"
VITE_AUTH_URI = "https://auth.stage.anaconda.com/api/auth"
VITE_AUTH_CLIENT_ID = "cec4781f-853c-4267-bf09-4bc59a2a3750"
VITE_AUTH_REDIRECT_URI = "https://preview.runt.run/oidc"
VITE_IFRAME_OUTPUT_URI = "https://preview.runtusercontent.com"
VITE_AI_PROVIDER = "anaconda"
VITE_LS_DEV = "true"
ANACONDA_PROJECTS_URL = "https://stage.anaconda.com/api/projects"
EXTERNAL_OIDC_URL = "https://auth.stage.anaconda.com/api/auth"
VITE_USE_PROJECTS_ARTIFACTS = "true"