{ "module": "hello-web", "slug": "hello", "version": "1", "capabilities": [ "container-runtime" ], "requires": [ "route" ], "contributes": { "route": { "label": "hello", "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" ] } ] }