48 definitions stop naming /var/lib/mesh/<module>: the directory says `place: "mesh"`, the two
subdirectories beneath it (gitea's runtime state, anthropic-manager's output) state their path
beneath it, and every credential, binding, merged file and mount names it as ${dir:mesh-state}.
Resolved on the default root, every definition names exactly the paths it named before —
TestPlacedDirectoriesKeepTheirPaths in mesh-controller, run over both checkouts. Needs the
controller that knows the word (mesh-controller, same branch) one release ahead.
101 lines
2.1 KiB
JSON
101 lines
2.1 KiB
JSON
{
|
|
"module": "records",
|
|
"version": "1",
|
|
"slug": "records",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"requires": [
|
|
"git"
|
|
],
|
|
"binds": {
|
|
"git": "${dir:mesh-state}/git.json"
|
|
},
|
|
"own-secrets": {
|
|
"broker": "${dir:mesh-state}/broker"
|
|
},
|
|
"consumes": [
|
|
"gitea.pull.merged"
|
|
],
|
|
"tools": [
|
|
"records_search",
|
|
"records_read",
|
|
"records_list",
|
|
"records_status",
|
|
"records_sync"
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "mesh"
|
|
},
|
|
{
|
|
"id": "checkout",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "."
|
|
},
|
|
{
|
|
"id": "config",
|
|
"type": "file",
|
|
"path": "${dir:mesh-state}/config.json",
|
|
"mode": "0600",
|
|
"content": "{}\n",
|
|
"merge": "json"
|
|
},
|
|
{
|
|
"id": "origin",
|
|
"type": "file",
|
|
"path": "${dir:mesh-state}/origin",
|
|
"mode": "0600",
|
|
"content": "${bound:git:scheme}://${bound:git:at}:${bound:git:port}\n"
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "records",
|
|
"network": "host",
|
|
"volumes": [
|
|
"${dir:mesh-state}/broker:/run/secrets/broker:ro",
|
|
"${dir:mesh-state}/config.json:/run/config/config.json:ro",
|
|
"${dir:mesh-state}/origin:/run/config/origin:ro",
|
|
"${dir:checkout}:${dir:checkout}"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "/run/secrets/broker",
|
|
"MESH_RECORDS_CONFIG_FILE": "/run/config/config.json",
|
|
"MESH_RECORDS_ORIGIN_FILE": "/run/config/origin",
|
|
"MESH_RECORDS_DIR": "${dir:checkout}"
|
|
},
|
|
"artifact": "runtime",
|
|
"restart-on": [
|
|
"config",
|
|
"origin"
|
|
]
|
|
}
|
|
],
|
|
"build": {
|
|
"on": [
|
|
{
|
|
"arg": "BUILD_BASE",
|
|
"module": "mesh-tools",
|
|
"artifact": "build"
|
|
},
|
|
{
|
|
"arg": "RUNTIME_BASE",
|
|
"module": "mesh-tools",
|
|
"artifact": "runtime"
|
|
}
|
|
],
|
|
"artifacts": [
|
|
{
|
|
"name": "runtime",
|
|
"kind": "image",
|
|
"from": "Dockerfile"
|
|
}
|
|
]
|
|
}
|
|
}
|