Six modules name no /var/lib: the root is a place, the maps reference it

The state directories say place "." — the assignment's own root — and
every bind, secret, own-secret, receives and grants path references it
as ${dir:state}/…; grants directories that are their own resources are
placed by id. gitea's two coincidence strings from the first pass
(${dir:data}base.json — resolving correctly by pure concatenation) are
spelled honestly now. What still says /var/lib is inside containers —
the software's contract — or under /var/lib/mesh, the mesh's own
plumbing, which the requirements unification absorbs next. Every
resolved path is byte-identical to what runs; landing this is a no-op
on the node, and the converter checks its own boundaries this time.
This commit is contained in:
2026-09-26 18:20:47 +02:00
parent dde8b15483
commit afdd149ab7
5 changed files with 72 additions and 74 deletions
+12 -12
View File
@@ -24,14 +24,14 @@
}
},
"binds": {
"postgres-database": "${dir:data}base.json",
"route": "/var/lib/gitea/route.json"
"postgres-database": "${dir:state}/database.json",
"route": "${dir:state}/route.json"
},
"secrets": {
"postgres-database": "${dir:data}base.secret",
"postgres-database": "${dir:state}/database.secret",
"secret": {
"internal-token": "/var/lib/gitea/internal-token.secret",
"admin": "/var/lib/gitea/admin.secret"
"internal-token": "${dir:state}/internal-token.secret",
"admin": "${dir:state}/admin.secret"
}
},
"capabilities": [
@@ -102,8 +102,8 @@
{
"id": "state",
"type": "directory",
"path": "/var/lib/gitea",
"mode": "0700"
"mode": "0700",
"place": "."
},
{
"id": "grants",
@@ -113,7 +113,7 @@
{
"id": "server-env",
"type": "file",
"path": "/var/lib/gitea/server.env",
"path": "${dir:state}/server.env",
"mode": "0600",
"content": "GITEA__security__INTERNAL_TOKEN=${secret:internal-token}\nGITEA__database__DB_TYPE=postgres\nGITEA__database__HOST=${bound:postgres-database:at}:${bound:postgres-database:port}\nGITEA__database__NAME=${bound:postgres-database:as}\nGITEA__database__USER=${bound:postgres-database:as}\nGITEA__database__PASSWD=${secret:postgres-database}\n"
},
@@ -134,7 +134,7 @@
"USER_GID": "1000"
},
"env-file": [
"/var/lib/gitea/server.env"
"${dir:state}/server.env"
],
"ports": [
"3000",
@@ -157,11 +157,11 @@
"MESH_GITEA_ADMIN_USER": "mesh-admin"
},
"env-file": [
"/var/lib/gitea/server.env"
"${dir:state}/server.env"
],
"volumes": [
"${dir:data}:/data",
"/var/lib/gitea/admin.secret:/run/secrets/admin:ro"
"${dir:state}/admin.secret:/run/secrets/admin:ro"
],
"args": [
"/bin/sh",
@@ -187,7 +187,7 @@
"/var/lib/mesh/gitea/broker:/run/secrets/broker:ro",
"/var/lib/mesh/gitea/config.json:/run/config/config.json:ro",
"${dir:grants}:${dir:grants}:ro",
"/var/lib/gitea/admin.secret:/run/secrets/admin:ro",
"${dir:state}/admin.secret:/run/secrets/admin:ro",
"/var/lib/mesh/gitea/state:/run/state"
],
"env": {