A module keeping a checkout of a repository of decisions, designs and issues from the git seat, current on every announced merge and on a timer, answering records_search / records_read / records_list / records_status / records_sync at the commit it read (novox/hq ADR 0025, ADR 0153). The repository is a setting; it names no mesh.
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": "/var/lib/mesh/records/git.json"
|
|
},
|
|
"own-secrets": {
|
|
"broker": "/var/lib/mesh/records/broker"
|
|
},
|
|
"consumes": [
|
|
"gitea.pull.merged"
|
|
],
|
|
"tools": [
|
|
"records_search",
|
|
"records_read",
|
|
"records_list",
|
|
"records_status",
|
|
"records_sync"
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh/records",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "checkout",
|
|
"type": "directory",
|
|
"path": "/var/lib/records",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "config",
|
|
"type": "file",
|
|
"path": "/var/lib/mesh/records/config.json",
|
|
"mode": "0600",
|
|
"content": "{}\n",
|
|
"merge": "json"
|
|
},
|
|
{
|
|
"id": "origin",
|
|
"type": "file",
|
|
"path": "/var/lib/mesh/records/origin",
|
|
"mode": "0600",
|
|
"content": "${bound:git:scheme}://${bound:git:at}:${bound:git:port}\n"
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "records",
|
|
"network": "host",
|
|
"volumes": [
|
|
"/var/lib/mesh/records/broker:/run/secrets/broker:ro",
|
|
"/var/lib/mesh/records/config.json:/run/config/config.json:ro",
|
|
"/var/lib/mesh/records/origin:/run/config/origin:ro",
|
|
"/var/lib/records:/var/lib/records"
|
|
],
|
|
"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": "/var/lib/records"
|
|
},
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
}
|