-
Notifications
You must be signed in to change notification settings - Fork 397
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
67 lines (62 loc) · 2.11 KB
/
Copy pathwrangler.jsonc
File metadata and controls
67 lines (62 loc) · 2.11 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
{
// Example: Worker + Durable Object hosting a Cloudflare Container whose
// ENTRYPOINT is the computerd daemon. This scaffold proves the wiring — the
// Worker reaches the DO, the DO boots the container, the container's
// computerd process answers /health on port 8080.
"$schema": "node_modules/wrangler/config-schema.json",
"name": "computer-container-example",
"main": "src/index.ts",
"compatibility_date": "2026-05-26",
"compatibility_flags": ["nodejs_compat"],
"containers": [
{
"class_name": "ContainerExample",
// Built from the local Dockerfile, which COPYs the computerd binary
// staged into ./build/ by the predev / predeploy hook.
"image": "./Dockerfile",
"instance_type": "standard-2",
"max_instances": 5,
"rollout_active_grace_period": 0,
"rollout_step_percentage": [100]
}
],
"durable_objects": {
"bindings": [
{
"name": "ContainerExample",
"class_name": "ContainerExample"
}
]
},
// R2 bucket mounted into every Workspace at /workspace/r2 via
// R2Bucket(...). Seed it once with:
// npm run seed:r2 --workspace @example/computer-container
// which uploads ./seed/data/hello.txt to the bucket.
// `bucket_name` is what `wrangler dev` and `wrangler deploy` both
// look at; omitting `preview_bucket_name` makes the same bucket
// back the local miniflare and the deployed worker, which keeps
// the seed scripts honest (a `--local` put and a `--remote` put
// both target `computer-container-hello`).
"r2_buckets": [
{
"binding": "Bucket",
"bucket_name": "computer-container-hello"
}
],
"migrations": [
{
"tag": "v1",
"new_sqlite_classes": ["ContainerExample"]
}
],
// Turn on the Workers Observability tracing surface. With this set,
// the runtime traces fetch handlers, binding calls, and any user
// spans opened via `ctx.tracing.enterSpan` or the workspace's
// Cloudflare observer adapter. Spans appear in the dashboard under
// Workers → Observability → Traces.
"observability": {
"traces": {
"enabled": true
}
}
}