brokeless: fully local by default, and a README for it

- BROKE_OFFLINE=1 (on in Docker) turns off the GitHub update check and the
  exchange-rate fetch, so the server makes no calls out
- auto-update in scripts/start.mjs pulls from your own repo (origin), never upstream
- install.sh points at brokeless; drop the workflow that merged upstream by itself
- compose project and image are named brokeless
- README: what changed from broke, how to run it, how to review upstream

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MangaValkandClaude Opus 5.5 committed 2026-11-17 14:08:42 +01:00
1 parent 861e65021f
commit cec3b15c2c
9 files changed
+139 -94

No files matched your search

+1
View File
@@ -19,6 +19,7 @@ let running: Promise<void> = Promise.resolve();
// Stores the days since the newest stored rate (2 years back on the first run), once a day per server process.
// ponytail: per-process memo; a cron would do it once for every server if there are many.
export function ensureRates(admin: SupabaseClient, today = new Date().toISOString().slice(0, 10)) {
if (process.env.BROKE_OFFLINE === "1") return running; // offline: no rates fetched, totals in other currencies are left out
if (checked === today) return running;
checked = today;
return (running = (async () => {
+1 -1
View File
@@ -7,7 +7,7 @@ const g = globalThis as unknown as { __brokeUpdate?: { at: number; newer: boolea
export async function updateReady() {
const built = process.env.BROKE_BUILT_FROM;
if (!built) return false;
if (!built || process.env.BROKE_OFFLINE === "1") return false; // offline: updates are pulled and reviewed by hand
if (g.__brokeUpdate && Date.now() - g.__brokeUpdate.at < 6 * 3600_000) return g.__brokeUpdate.newer;
let newer = false;
try {