The postgres provisioner creates each consumer a database named after the login the mesh
minted (mesh_<node>_<module>), per ADR 0048 -- 'a same-named database under exactly that
login'. But baserow, letta, umami, gitea, keycloak and nextcloud each hardcoded their app db
name (DATABASE_NAME=baserow, /letta, /umami, NAME=gitea, /keycloak, POSTGRES_DB=nextcloud),
so the service connected to a database that does not exist ('database letta does not exist').
Each now uses ${bound:postgres-database:as} as the db name -- the login, which is also the db
name -- matching the working meshboard pattern and the provisioner's actual behaviour.
Found by the two-node DB-consumer lab install (mesh-lab assigned-two-node-db); baserow is
proven connecting and running there. The S3 bucket name is the same class of assumption and is
a separate follow-up (s3 identity has its own length bound).
Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
115 lines
3.3 KiB
JSON
115 lines
3.3 KiB
JSON
{
|
|
"module": "nextcloud",
|
|
"version": "1",
|
|
"requires": [
|
|
"postgres-database",
|
|
"s3-bucket"
|
|
],
|
|
"contributes": {
|
|
"postgres-database": {
|
|
"name": "nextcloud"
|
|
},
|
|
"s3-bucket": {
|
|
"bucket": "nextcloud"
|
|
}
|
|
},
|
|
"binds": {
|
|
"postgres-database": "/var/lib/nextcloud-module/database.json",
|
|
"s3-bucket": "/var/lib/nextcloud-module/store.json"
|
|
},
|
|
"secrets": {
|
|
"postgres-database": "/var/lib/nextcloud-module/database.secret",
|
|
"s3-bucket": "/var/lib/nextcloud-module/store.secret"
|
|
},
|
|
"emits": [
|
|
"module.nextcloud.user.created",
|
|
"module.nextcloud.share.created"
|
|
],
|
|
"own-secrets": {
|
|
"admin": "/var/lib/nextcloud-module/admin.secret",
|
|
"broker": "/var/lib/mesh/nextcloud/broker"
|
|
},
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"listens": [
|
|
{
|
|
"port": 80,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "files and sync, over http; a public name is a route grant later"
|
|
}
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh/nextcloud",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"path": "/var/lib/nextcloud-module",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "server-env",
|
|
"type": "file",
|
|
"path": "/var/lib/nextcloud-module/server.env",
|
|
"mode": "0600",
|
|
"content": "POSTGRES_HOST=${bound:postgres-database:at}:${bound:postgres-database:port}\nPOSTGRES_DB=${bound:postgres-database:as}\nPOSTGRES_USER=${bound:postgres-database:as}\nPOSTGRES_PASSWORD=${secret:postgres-database}\nNEXTCLOUD_ADMIN_USER=admin\nNEXTCLOUD_ADMIN_PASSWORD=${secret:admin}\nOBJECTSTORE_S3_HOST=${bound:s3-bucket:at}\nOBJECTSTORE_S3_PORT=${bound:s3-bucket:port}\nOBJECTSTORE_S3_BUCKET=nextcloud\nOBJECTSTORE_S3_KEY=${bound:s3-bucket:as}\nOBJECTSTORE_S3_SECRET=${secret:s3-bucket}\nOBJECTSTORE_S3_SSL=false\nOBJECTSTORE_S3_USEPATH_STYLE=true\n"
|
|
},
|
|
{
|
|
"id": "html",
|
|
"type": "directory",
|
|
"path": "/services/nextcloud/html",
|
|
"mode": "0750",
|
|
"owner": "33:33"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "nextcloud",
|
|
"image": "nextcloud@sha256:0b8261f6335af6b95264ce893b4d645857638e0fa151b5ba620f25f377318ae1",
|
|
"env-file": [
|
|
"/var/lib/nextcloud-module/server.env"
|
|
],
|
|
"ports": [
|
|
"80"
|
|
],
|
|
"volumes": [
|
|
"/services/nextcloud/html:/var/www/html"
|
|
]
|
|
},
|
|
{
|
|
"id": "runtime-config",
|
|
"type": "file",
|
|
"path": "/var/lib/mesh/nextcloud/config.json",
|
|
"mode": "0600",
|
|
"content": "{}\n",
|
|
"merge": "json"
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "mesh-nextcloud",
|
|
"image": "mesh-runtime-nextcloud@sha256:0000000000000000000000000000000000000000000000000000000000000000",
|
|
"network": "host",
|
|
"volumes": [
|
|
"/var/lib/mesh/nextcloud/broker:/run/secrets/broker:ro",
|
|
"/var/lib/mesh/nextcloud/config.json:/run/config/config.json:ro",
|
|
"/var/run/docker.sock:/var/run/docker.sock"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "/run/secrets/broker",
|
|
"MESH_NEXTCLOUD_URL": "http://127.0.0.1:80",
|
|
"MESH_NEXTCLOUD_CONFIG_FILE": "/run/config/config.json"
|
|
},
|
|
"restart-on": [
|
|
"runtime-config"
|
|
]
|
|
}
|
|
]
|
|
}
|