fixed monitorjs added transative deps in dockerfile

This commit is contained in:
Shivam Patel
2026-02-09 16:03:31 -05:00
parent f95e28202d
commit 04407416b3
2 changed files with 9 additions and 1 deletions

View File

@@ -55,6 +55,7 @@ COPY --from=builder --chown=nextjs:nodejs /app/node_modules/rss-parser ./node_mo
COPY --from=builder --chown=nextjs:nodejs /app/node_modules/xml2js ./node_modules/xml2js COPY --from=builder --chown=nextjs:nodejs /app/node_modules/xml2js ./node_modules/xml2js
COPY --from=builder --chown=nextjs:nodejs /app/node_modules/sax ./node_modules/sax COPY --from=builder --chown=nextjs:nodejs /app/node_modules/sax ./node_modules/sax
COPY --from=builder --chown=nextjs:nodejs /app/node_modules/xmlbuilder ./node_modules/xmlbuilder COPY --from=builder --chown=nextjs:nodejs /app/node_modules/xmlbuilder ./node_modules/xmlbuilder
COPY --from=builder --chown=nextjs:nodejs /app/node_modules/entities ./node_modules/entities
COPY --chown=nextjs:nodejs start.sh ./ COPY --chown=nextjs:nodejs start.sh ./
RUN chmod +x start.sh RUN chmod +x start.sh

View File

@@ -1,8 +1,14 @@
const sqlite3 = require('sqlite3'); const sqlite3 = require('sqlite3');
const { open } = require('sqlite'); const { open } = require('sqlite');
const RSSParser = require('rss-parser');
// Node 18+ has global fetch built-in // Node 18+ has global fetch built-in
let RSSParser;
try {
RSSParser = require('rss-parser');
} catch (e) {
console.warn('rss-parser not available, RSS sync disabled:', e.message);
}
const DEFAULT_SERVICES = [ const DEFAULT_SERVICES = [
{ name: 'Website', url: 'https://akkolli.net' }, { name: 'Website', url: 'https://akkolli.net' },
{ name: 'Gitea', url: 'https://code.akkolli.net' }, { name: 'Gitea', url: 'https://code.akkolli.net' },
@@ -80,6 +86,7 @@ async function setupRssTables(db) {
} }
async function syncRssFeeds(db) { async function syncRssFeeds(db) {
if (!RSSParser) return;
const parser = new RSSParser({ timeout: 5000 }); const parser = new RSSParser({ timeout: 5000 });
const feeds = await db.all('SELECT * FROM rss_feeds'); const feeds = await db.all('SELECT * FROM rss_feeds');