The records container goes with its Dockerfile, build bases and bus credential. The checkout, the config file and the origin file are read where the mesh writes them, and git comes from the machine's git package instead of the image's apt layer.
81 lines
1.5 KiB
JSON
81 lines
1.5 KiB
JSON
{
|
|
"module": "records",
|
|
"version": "1",
|
|
"slug": "records",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"requires": [
|
|
"git"
|
|
],
|
|
"binds": {
|
|
"git": "${dir:mesh-state}/git.json"
|
|
},
|
|
"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": "git",
|
|
"type": "package",
|
|
"package": "git"
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "code",
|
|
"kind": "bundle",
|
|
"language": "typescript",
|
|
"entrypoints": [
|
|
"index.js",
|
|
"tools/index.js"
|
|
],
|
|
"loads": [
|
|
"index.js",
|
|
"tools/index.js"
|
|
],
|
|
"env": {
|
|
"MESH_RECORDS_CONFIG_FILE": "${dir:mesh-state}/config.json",
|
|
"MESH_RECORDS_ORIGIN_FILE": "${dir:mesh-state}/origin",
|
|
"MESH_RECORDS_DIR": "${dir:checkout}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|