Log data location and counts at startup; give the compose volume a fixed name
build-container / build (push) Successful in 1m59s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-10-20 14:46:55 -04:00
1 parent e9397f1f21
commit f14a726f32
2 files changed
+7

No files matched your search

+6
View File
@@ -262,6 +262,12 @@ async function plexProxy(req, res) {
} catch (e) { if (!res.headersSent) { res.writeHead(502); res.end(); } else res.destroy(); }
}
{ // Make it obvious in the log whether data survived a redeploy.
const dir = process.env.DATA_DIR || require('path').join(__dirname, 'data');
const count = f => { try { const j = JSON.parse(require('fs').readFileSync(require('path').join(dir, f), 'utf8')); return Array.isArray(j) ? j.length : (j.creds || []).length; } catch { return 0; } };
console.log(`[data] ${dir}: ${count('passkeys.json')} passkeys, ${count('calendars.json')} calendars`);
}
if (!JWT_SECRET) console.warn('WARNING: ONLYOFFICE_JWT_SECRET not set. In-app editing only works if the Document Server has JWT disabled, and save callbacks are unauthenticated. Testing only.');
http.createServer((req, res) => {