Feature 57 (config and provisioning): release photos #5

Merged
mesh-tools merged 1 commits from release/57-config-and-provisioning into nox-mesh 2026-10-16 13:04:21 +00:00
4 changed files with 37 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
REACT_APP_API_URL=https://${bound:route:name-api}
+11
View File
@@ -0,0 +1,11 @@
NODE_ENV=production
PORT=9000
MONGO_URL=mongodb://${bound:mongodb-database:as}:${secret:mongodb-database}@${bound:mongodb-database:at}:${bound:mongodb-database:port}/${bound:mongodb-database:as}?authSource=${bound:mongodb-database:as}
MONGO_DB=${bound:mongodb-database:as}
MINIO_ENDPOINT=${bound:s3-bucket:at}
MINIO_PORT=${bound:s3-bucket:port}
MINIO_BUCKET=${bound:s3-bucket:bucket}
MINIO_ACCESSKEY=${bound:s3-bucket:as}
MINIO_SECRET=${secret:s3-bucket}
MINIO_USE_SSL=false
SUPER_ADMIN_KEY=${secret:admin-key}
+18
View File
@@ -19,4 +19,22 @@ for part in server client admin-client; do
(cd "$part" && npm ci --no-audit --no-fund --loglevel=error && CI=false npm run build)
done
node --check client-server/serve.mjs
# The file text (novox/hq ADR 0349 §2): no file resource keeps its text inline in module.json; each names its
# template in files/, which the build packs into the one archive named files that the mesh reads the text from.
node -e '
const fs = require("fs");
const m = JSON.parse(fs.readFileSync("module.json", "utf8"));
const bad = [];
for (const r of m.resources || []) {
if (r.type !== "file") continue;
if ("content" in r) bad.push(`resource ${r.id} keeps its text inline: keep it in files/ and name it as the template`);
else if (typeof r.template !== "string" || !r.template.startsWith("files/") || !fs.existsSync(r.template))
bad.push(`resource ${r.id} names no template in files/ that is there: ${r.template}`);
}
const packs = ((m.build || {}).artifacts || []).filter((a) => a.kind === "archive" && a.from === "files" && a.name === "files").length;
if (packs !== 1) bad.push(`the build packs files/ into ${packs} archive(s) named files, not one`);
if (bad.length) { for (const b of bad) console.error(b); process.exit(1); }
console.log("every file takes its text from a template in files/");
'
echo "NOT RUN HERE: the server (it wants its object and document stores); the application has no tests"
+7 -2
View File
@@ -106,14 +106,14 @@
"type": "file",
"path": "${dir:state}/server.env",
"mode": "0600",
"content": "NODE_ENV=production\nPORT=9000\nMONGO_URL=mongodb://${bound:mongodb-database:as}:${secret:mongodb-database}@${bound:mongodb-database:at}:${bound:mongodb-database:port}/${bound:mongodb-database:as}?authSource=${bound:mongodb-database:as}\nMONGO_DB=${bound:mongodb-database:as}\nMINIO_ENDPOINT=${bound:s3-bucket:at}\nMINIO_PORT=${bound:s3-bucket:port}\nMINIO_BUCKET=${bound:s3-bucket:bucket}\nMINIO_ACCESSKEY=${bound:s3-bucket:as}\nMINIO_SECRET=${secret:s3-bucket}\nMINIO_USE_SSL=false\nSUPER_ADMIN_KEY=${secret:admin-key}\n"
"template": "files/server.env"
},
{
"id": "client-env",
"type": "file",
"path": "${dir:state}/client.env",
"mode": "0644",
"content": "REACT_APP_API_URL=https://${bound:route:name-api}\n"
"template": "files/client.env"
},
{
"id": "net",
@@ -196,6 +196,11 @@
"name": "admin-client",
"kind": "image",
"from": "admin-client/Dockerfile"
},
{
"name": "files",
"kind": "archive",
"from": "files"
}
]
}