101 lines
2.2 KiB
JSON
101 lines
2.2 KiB
JSON
{
|
|
"module": "mesh-catalog",
|
|
"slug": "catalog",
|
|
"version": "1",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"claims": [
|
|
{
|
|
"name": "the-catalogue",
|
|
"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": [
|
|
"module.builder.built"
|
|
],
|
|
"emits": [
|
|
"module.mesh-catalog.registered",
|
|
"module.mesh-catalog.upgraded",
|
|
"module.mesh-catalog.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"
|
|
}
|
|
]
|
|
}
|
|
}
|