keycloak, mailu, minio, mongodb, mssql, nextcloud, portainer, redis, umami and verdaccio get the Dockerfile + build section the eight buildable modules already had; their runtime containers name the artifact instead of a placeholder digest. One convention, settled (060's open question, informed by 061): the runtime container runs serve mode with every serve-time entrypoint in MESH_TOOL_MODULES — tools serve, events flow, and a provider's provisioner reconciles in the same process with the broker connected. postgres, gitea and lavinmq are retrofitted from args-run provisioners, which served no tools and emitted lifecycle events nowhere. route-proxy is deferred: its build context is the mesh-controller repository, a cross-repo shape the build section cannot yet express.
126 lines
2.8 KiB
JSON
126 lines
2.8 KiB
JSON
{
|
|
"module": "postgres",
|
|
"version": "1",
|
|
"provides": [
|
|
{
|
|
"name": "postgres-database",
|
|
"scope": "mesh"
|
|
}
|
|
],
|
|
"claims": [
|
|
{
|
|
"name": "mesh-store",
|
|
"scope": "mesh"
|
|
}
|
|
],
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"emits": [
|
|
"module.postgres.database.provisioned",
|
|
"module.postgres.database.deprovisioned"
|
|
],
|
|
"consumes": [
|
|
"module.postgres.database.provisioned",
|
|
"module.postgres.database.deprovisioned"
|
|
],
|
|
"listens": [
|
|
{
|
|
"port": 5432,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "modules on any machine that were granted a database"
|
|
}
|
|
],
|
|
"serves": {
|
|
"postgres-database": {
|
|
"port": 5432
|
|
}
|
|
},
|
|
"receives": {
|
|
"postgres-database": "/var/lib/postgres/grants/mesh.json"
|
|
},
|
|
"grants": {
|
|
"postgres-database": "/var/lib/postgres/grants"
|
|
},
|
|
"own-secrets": {
|
|
"superuser": "/var/lib/postgres/superuser.secret",
|
|
"broker": "/var/lib/mesh/postgres/broker"
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh/postgres",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"path": "/var/lib/postgres",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "grants",
|
|
"type": "directory",
|
|
"path": "/var/lib/postgres/grants",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "mesh-store",
|
|
"image": "postgres@sha256:7456ef82e5f5bc43d997f4781bbd7c0d6389bff397564649a356e206ba473aee",
|
|
"env": {
|
|
"POSTGRES_PASSWORD": "bootstrap",
|
|
"PGDATA": "/var/lib/postgresql/data/pgdata"
|
|
},
|
|
"ports": [
|
|
"5432:5432"
|
|
],
|
|
"volumes": [
|
|
"mesh-store-data:/var/lib/postgresql/data"
|
|
]
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "mesh-postgres",
|
|
"network": "host",
|
|
"volumes": [
|
|
"/var/lib/mesh/postgres/broker:/run/secrets/broker:ro",
|
|
"/var/lib/postgres/grants:/var/lib/postgres/grants:ro",
|
|
"/var/lib/postgres/superuser.secret:/run/secrets/superuser:ro"
|
|
],
|
|
"env": {
|
|
"MESH_PROVISION_POSTGRES": "postgres://postgres@127.0.0.1:5432/postgres?sslmode=disable",
|
|
"MESH_PROVISION_PASSWORD_FILE": "/run/secrets/superuser",
|
|
"MESH_BROKER_FILE": "/run/secrets/broker",
|
|
"MESH_RECEIVES": "/var/lib/postgres/grants/mesh.json"
|
|
},
|
|
"artifact": "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"
|
|
}
|
|
]
|
|
}
|
|
}
|