Files
mesh-catalog/modules/mesh-catalog/module.json
T
jschoubben b58a3b487d A build's outcome belongs to the role, not to the module holding it
ADR 0121. The builder declared `built` as its own event, so every consumer depended
on which module happens to be the build machine today. It is the build-machine
role's event now: the builder declares none of its own, and the catalogue listens
for `mesh-build-machine.built` rather than `builder.built`.

Nothing changes about what reaches the catalogue. What changes is that it survives
the build machine being a different module, which is the whole reason the mesh has a
word for a role.
2026-09-27 15:37:21 +02:00

101 lines
2.2 KiB
JSON

{
"module": "mesh-catalog",
"slug": "catalog",
"version": "1",
"capabilities": [
"container-runtime"
],
"claims": [
{
"name": "mesh-catalog",
"scope": "mesh"
}
],
"requires": [
"postgres-database"
],
"contributes": {
"postgres-database": {
"name": "mesh_catalog"
}
},
"binds": {
"postgres-database": "/var/lib/mesh-catalog/database.json"
},
"secrets": {
"postgres-database": "/var/lib/mesh-catalog/database.secret"
},
"own-secrets": {
"broker": "/var/lib/mesh/mesh-catalog/broker"
},
"consumes": [
"mesh-build-machine.built"
],
"emits": [
"registered",
"upgraded",
"rebuild-needed"
],
"resources": [
{
"id": "mesh-state",
"type": "directory",
"path": "/var/lib/mesh/mesh-catalog",
"mode": "0700"
},
{
"id": "state",
"type": "directory",
"path": "/var/lib/mesh-catalog",
"mode": "0700"
},
{
"id": "database-url",
"type": "file",
"path": "/var/lib/mesh-catalog/database.url",
"mode": "0600",
"content": "postgresql://${bound:postgres-database:as}:${secret:postgres-database}@${bound:postgres-database:at}:${bound:postgres-database:port}/${bound:postgres-database:as}\n"
},
{
"id": "runtime",
"type": "container",
"name": "mesh-catalog",
"network": "host",
"volumes": [
"/var/lib/mesh/mesh-catalog/broker:/run/secrets/broker:ro",
"/var/lib/mesh-catalog:/run/state",
"/var/lib/mesh-catalog/database.url:/run/secrets/database-url:ro"
],
"env": {
"MESH_BROKER_FILE": "/run/secrets/broker",
"DATABASE_URL_FILE": "/run/secrets/database-url"
},
"artifact": "runtime",
"restart-on": [
"database-url"
]
}
],
"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"
}
]
}
}