Merge branch 'dev'

This commit is contained in:
Jeff Emmett 2026-03-24 19:06:13 -07:00
commit 90ecc1d952
1 changed files with 17 additions and 19 deletions

View File

@ -3755,6 +3755,23 @@ loadAllDocs(syncServer)
} catch (e) { } catch (e) {
console.error("[TokenService] Seed failed:", e); console.error("[TokenService] Seed failed:", e);
} }
// Provision Mailcow forwarding aliases for all existing spaces
const ENCRYPTID_INTERNAL_FOR_ALIAS = process.env.ENCRYPTID_INTERNAL_URL || "http://encryptid:3000";
try {
const slugs = await listCommunities();
let count = 0;
for (const slug of slugs) {
if (slug === "demo") continue;
try {
await fetch(`${ENCRYPTID_INTERNAL_FOR_ALIAS}/api/internal/spaces/${slug}/alias`, { method: "POST" });
count++;
} catch { /* encryptid not ready yet, will provision on next restart */ }
}
if (count > 0) console.log(`[SpaceAlias] Provisioned ${count} space aliases`);
} catch (e) {
console.error("[SpaceAlias] Startup provisioning failed:", e);
}
}) })
.catch((e) => console.error("[DocStore] Startup load failed:", e)); .catch((e) => console.error("[DocStore] Startup load failed:", e));
@ -3779,24 +3796,5 @@ loadAllDocs(syncServer)
} }
})(); })();
// Provision Mailcow forwarding aliases for all existing spaces
const ENCRYPTID_INTERNAL_FOR_ALIAS = process.env.ENCRYPTID_INTERNAL_URL || "http://encryptid:3000";
(async () => {
try {
const slugs = await listCommunities();
let count = 0;
for (const slug of slugs) {
if (slug === "demo") continue;
try {
await fetch(`${ENCRYPTID_INTERNAL_FOR_ALIAS}/api/internal/spaces/${slug}/alias`, { method: "POST" });
count++;
} catch { /* encryptid not ready yet, will provision on next restart */ }
}
if (count > 0) console.log(`[SpaceAlias] Provisioned ${count} space aliases`);
} catch (e) {
console.error("[SpaceAlias] Startup provisioning failed:", e);
}
})();
console.log(`rSpace unified server running on http://localhost:${PORT}`); console.log(`rSpace unified server running on http://localhost:${PORT}`);
console.log(`Modules: ${getAllModules().map((m) => `${m.icon} ${m.name}`).join(", ")}`); console.log(`Modules: ${getAllModules().map((m) => `${m.icon} ${m.name}`).join(", ")}`);