fixed monitorjs added transative deps in dockerfile
This commit is contained in:
@@ -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/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/entities ./node_modules/entities
|
||||
COPY --chown=nextjs:nodejs start.sh ./
|
||||
RUN chmod +x start.sh
|
||||
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
const sqlite3 = require('sqlite3');
|
||||
const { open } = require('sqlite');
|
||||
const RSSParser = require('rss-parser');
|
||||
// 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 = [
|
||||
{ name: 'Website', url: 'https://akkolli.net' },
|
||||
{ name: 'Gitea', url: 'https://code.akkolli.net' },
|
||||
@@ -80,6 +86,7 @@ async function setupRssTables(db) {
|
||||
}
|
||||
|
||||
async function syncRssFeeds(db) {
|
||||
if (!RSSParser) return;
|
||||
const parser = new RSSParser({ timeout: 5000 });
|
||||
const feeds = await db.all('SELECT * FROM rss_feeds');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user