From 79d072ac59f2d4f302b8089d3ce07698f0ddf8aa Mon Sep 17 00:00:00 2001 From: Ricardo Date: Sat, 28 Mar 2026 22:57:21 +0100 Subject: [PATCH] feat: create startup-gate readiness signal after successful build --- eleventy.config.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/eleventy.config.js b/eleventy.config.js index 68e5fb7..2a1d644 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1485,6 +1485,18 @@ export default function (eleventyConfig) { } } + // Signal readiness to Indiekit plugins — build is complete, system is stable. + // Plugins poll for this file via @rmdes/indiekit-startup-gate before starting + // heavy background tasks (feed polling, AP federation, sync jobs). + // Only fires once — subsequent incremental builds skip this. + const readyPath = "/app/data/.indiekit-ready"; + if (!existsSync(readyPath)) { + try { + writeFileSync(readyPath, ""); + console.log("[startup-gate] Readiness signal created — plugins will start deferred tasks"); + } catch { /* not running in Cloudron container — skip */ } + } + // Force garbage collection after post-build work completes. // V8 doesn't return freed heap pages to the OS without GC pressure. // In watch mode the watcher sits idle after its initial full build,