The 21 media/home modules, the SaaS tool modules (cloudflare-dns, confluence, gitlab, jira), model-usage, and the model-access trio get the same Dockerfile + build section as batch 1. Scheduled-only modules (anthropic-consumer, anthropic-manager, openai-consumer) deliberately declare no MESH_TOOL_MODULES — every container of theirs names its command. mosquitto's run-once bootstrap container builds from the same artifact. Modules with third-party deps (model-usage: pg; anthropic-manager: tweetnacl) install them beside their compiled code. Also fixes cloudflare-dns's package.json, unparseable since its description lost a closing quote. Deliberately still without build sections: builder and mesh-controller (the foundation builds them by its own path), distribution (provides the artifact store — building it through itself is refused by design), route-proxy (cross-repo build context, deferred), and the upstream-image-only modules, which have no code to build.
88 lines
1.9 KiB
JSON
88 lines
1.9 KiB
JSON
{
|
|
"module": "model-usage",
|
|
"version": "1",
|
|
"slug": "usage",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"requires": [
|
|
"postgres-database"
|
|
],
|
|
"contributes": {
|
|
"postgres-database": {
|
|
"name": "model_usage"
|
|
}
|
|
},
|
|
"binds": {
|
|
"postgres-database": "/var/lib/model-usage/database.json"
|
|
},
|
|
"secrets": {
|
|
"postgres-database": "/var/lib/model-usage/database.secret"
|
|
},
|
|
"consumes": [
|
|
"module.*.usage.*"
|
|
],
|
|
"own-secrets": {
|
|
"broker": "/var/lib/mesh/model-usage/broker"
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh/model-usage",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"path": "/var/lib/model-usage",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "db-env",
|
|
"type": "file",
|
|
"path": "/var/lib/model-usage/db.env",
|
|
"mode": "0600",
|
|
"content": "DATABASE_URL=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-model-usage",
|
|
"network": "host",
|
|
"volumes": [
|
|
"/var/lib/mesh/model-usage/broker:/run/secrets/broker:ro",
|
|
"/var/lib/model-usage:/run/state"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "/run/secrets/broker"
|
|
},
|
|
"env-file": [
|
|
"/var/lib/model-usage/db.env"
|
|
],
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
}
|