Log data location and counts at startup; give the compose volume a fixed name
build-container / build (push) Successful in 1m59s
build-container / build (push) Successful in 1m59s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e9397f1f21
commit
f14a726f32
2 files changed
+7
No files matched your search
@@ -23,3 +23,4 @@ services:
|
||||
- hub-data:/data # passkeys, calendar links and the session secret live here
|
||||
volumes:
|
||||
hub-data:
|
||||
name: nehub-data # fixed name so the data survives redeploys and renamed stacks
|
||||
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user