From the survey of every env-file secret (ADR 0086, issue 041): amqp-ping, minio, mongodb and grafana use the _FILE twin their software honours; mesh-catalog and model-usage read DATABASE_URL_FILE (a file the mesh templates, mounted where only the runtime reads it); grafana's secret files belong to its own account. Two dead deliveries removed: a line nothing read in amqp-email-forwarder, and mailu's secret.env on four containers that never read it. The 25 exceptions that remain carry the surveyed reason — convertible and awaiting a bed, convertible through a generated config file, the application's own code, or not convertible.
69 lines
1.7 KiB
JSON
69 lines
1.7 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": "database-url",
|
|
"type": "file",
|
|
"path": "/var/lib/model-usage/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-model-usage",
|
|
"image": "mesh-runtime-model-usage@sha256:0000000000000000000000000000000000000000000000000000000000000000",
|
|
"network": "host",
|
|
"volumes": [
|
|
"/var/lib/mesh/model-usage/broker:/run/secrets/broker:ro",
|
|
"/var/lib/model-usage:/run/state",
|
|
"/var/lib/model-usage/database.url:/run/secrets/database-url:ro"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "/run/secrets/broker",
|
|
"DATABASE_URL_FILE": "/run/secrets/database-url"
|
|
},
|
|
"env-file": [
|
|
"/var/lib/model-usage/db.env"
|
|
]
|
|
}
|
|
]
|
|
}
|