Events: env template, church export, register with HUB_LICENCE_KEY

- apps/events/env.template.json (crosscode.env-template/1): every .env
  variable with its layer (server, defaults, install, generated).
- scripts/export-church.ts writes crosscode.church-export/1 (export-only
  references, no internal ids or secrets) for crosscode export.
- Installs made from the Hub register by themselves on first start when
  HUB_LICENCE_KEY is set (retries while the Hub is unreachable).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 12:06:01 +02:00
co-authored by Claude Opus 5.5
parent 90a98a4306
commit 350ab9f4e8
7 changed files with 378 additions and 2 deletions
+3 -1
View File
@@ -396,7 +396,9 @@ app.listen(PORT, () => {
// backup, temp cleanup) run on the pg-boss job queue — see src/jobs/index.js.
require('./jobs').startJobs().catch(e => console.warn('[jobs] Not started:', e?.message || e));
// Check in with the Hub 30 s after starting, so the licence is fresh without waiting 15 minutes.
// Installs made from the Hub register by themselves (HUB_LICENCE_KEY), then check in with the
// Hub 30 s after starting, so the licence is fresh without waiting 15 minutes.
require('./hub/client').connectFromEnv().catch(() => {});
require('./hub/client').heartbeatSoon();
// Scheduled emails worker (polling)