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.
99 lines
2.0 KiB
JSON
99 lines
2.0 KiB
JSON
{
|
|
"module": "cloudflare-dns",
|
|
"version": "1",
|
|
"slug": "cfdns",
|
|
"provides": [
|
|
{
|
|
"name": "public-dns",
|
|
"scope": "mesh"
|
|
}
|
|
],
|
|
"serves": {
|
|
"public-dns": {}
|
|
},
|
|
"grants": {
|
|
"public-dns": "${dir:grants}"
|
|
},
|
|
"receives": {
|
|
"public-dns": "${dir:grants}/mesh.json"
|
|
},
|
|
"own-secrets": {
|
|
"token": "${dir:state}/token",
|
|
"broker": "${dir:mesh-state}/broker"
|
|
},
|
|
"emits": [
|
|
"record.created",
|
|
"record.removed"
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "mesh"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "."
|
|
},
|
|
{
|
|
"id": "grants",
|
|
"type": "directory",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "config",
|
|
"type": "file",
|
|
"path": "${dir:state}/config.json",
|
|
"merge": "json",
|
|
"content": "{}",
|
|
"mode": "0600"
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "mesh-cloudflare-dns",
|
|
"network": "host",
|
|
"volumes": [
|
|
"${dir:state}/config.json:/run/config/config.json:ro",
|
|
"${dir:grants}:/grants",
|
|
"${dir:state}/token:/run/secrets/token:ro",
|
|
"${dir:mesh-state}/broker:/run/secrets/broker:ro"
|
|
],
|
|
"env": {
|
|
"MESH_CLOUDFLARE_TOKEN_FILE": "/run/secrets/token",
|
|
"MESH_BROKER_FILE": "/run/secrets/broker",
|
|
"MESH_CLOUDFLARE_CONFIG_FILE": "/run/config/config.json",
|
|
"MESH_RECEIVES": "/var/lib/cloudflare-dns/grants/mesh.json"
|
|
},
|
|
"artifact": "runtime"
|
|
}
|
|
],
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
}
|