A module's runtime image was assembled by a script copying the sdk and the tool runtime out of neighbouring checkouts, so it could only be built on a workstation that had them. That is why no module declared what it was made of and why forty-seven point at a placeholder. The tool runtime becomes an image a module's runtime is built FROM, published like any other artifact. The module then builds from its own directory and that base — one clone, which is what the builder can actually be asked for (novox/hq ADR 0069). The dependency stops being a property of somebody's machine and becomes a build edge, pinned to a digest the mesh's registry assigned. The compiler is invoked by its real path rather than through node_modules/.bin: those are symlinks to a launcher that requires its library relatively, and resolving them while building the base leaves a launcher pointing at nothing. Claude-Session: https://claude.ai/code/session_01D6qtiYU3P9jk3pnAXyAFyx
74 lines
1.5 KiB
JSON
74 lines
1.5 KiB
JSON
{
|
|
"module": "amqp-ping",
|
|
"slug": "ping",
|
|
"version": "1",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"requires": [
|
|
"amqp"
|
|
],
|
|
"contributes": {},
|
|
"binds": {
|
|
"amqp": "/var/lib/amqp-ping/amqp.json"
|
|
},
|
|
"secrets": {
|
|
"amqp": "/var/lib/amqp-ping/amqp.secret"
|
|
},
|
|
"own-secrets": {
|
|
"broker": "/var/lib/mesh/amqp-ping/broker"
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh/amqp-ping",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"path": "/var/lib/amqp-ping",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "amqp-env",
|
|
"type": "file",
|
|
"path": "/var/lib/amqp-ping/amqp.env",
|
|
"mode": "0600",
|
|
"content": "MESH_AMQP_HOST=${bound:amqp:at}\nMESH_AMQP_PORT=${bound:amqp:port}\nMESH_AMQP_USER=${bound:amqp:as}\nMESH_AMQP_VHOST=${bound:amqp:as}\nMESH_AMQP_PASSWORD=${secret:amqp}\n"
|
|
},
|
|
{
|
|
"id": "net",
|
|
"type": "network",
|
|
"name": "amqp-ping"
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "amqp-ping",
|
|
"network": "amqp-ping",
|
|
"env-file": [
|
|
"/var/lib/amqp-ping/amqp.env"
|
|
],
|
|
"args": [
|
|
"run",
|
|
"/app/modules/amqp-ping/dist/index.js"
|
|
],
|
|
"restart-on": [
|
|
"amqp-env"
|
|
],
|
|
"artifact": "runtime"
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "runtime",
|
|
"kind": "image",
|
|
"from": "Dockerfile"
|
|
}
|
|
]
|
|
}
|
|
}
|