mesh_anchor_hello_web is 21 chars, one over the S3 access-key bound; slug 'hello' brings it to 17. Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
67 lines
1.4 KiB
JSON
67 lines
1.4 KiB
JSON
{
|
|
"module": "hello-web",
|
|
"slug": "hello",
|
|
"version": "1",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"requires": [
|
|
"route"
|
|
],
|
|
"contributes": {
|
|
"route": {
|
|
"name": "hello.example",
|
|
"port": 8080
|
|
}
|
|
},
|
|
"binds": {
|
|
"route": "/var/lib/hello-web/route.json"
|
|
},
|
|
"listens": [
|
|
{
|
|
"port": 8080,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "the demo web page; only the route-proxy reaches it, and the public name is a route grant"
|
|
}
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"path": "/var/lib/hello-web",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "page",
|
|
"type": "file",
|
|
"path": "/var/lib/hello-web/index.html",
|
|
"mode": "0644",
|
|
"content": "hello from hello-web, routed by the mesh\n"
|
|
},
|
|
{
|
|
"id": "net",
|
|
"type": "network",
|
|
"name": "hello-web"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "hello-web",
|
|
"image": "alpine@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b",
|
|
"network": "hello-web",
|
|
"ports": [
|
|
"8080:8080"
|
|
],
|
|
"volumes": [
|
|
"/var/lib/hello-web/index.html:/www/index.html:ro"
|
|
],
|
|
"args": [
|
|
"sh",
|
|
"-c",
|
|
"while true; do { printf 'HTTP/1.1 200 OK\\r\\nContent-Type: text/plain\\r\\nConnection: close\\r\\n\\r\\n'; cat /www/index.html; } | nc -l -p 8080; done"
|
|
]
|
|
}
|
|
]
|
|
}
|