mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 10:26:41 -05:00
wip
This commit is contained in:
29
pm2.config.js
Normal file
29
pm2.config.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const grabArgs = [
|
||||
'--channels=channels.xml',
|
||||
'--output=public/guide.xml',
|
||||
process.env.MAX_CONNECTIONS ? `--maxConnections=${process.env.MAX_CONNECTIONS}` : null,
|
||||
process.env.DAYS ? `--days=${process.env.DAYS}` : null,
|
||||
process.env.GZIP === 'true' ? '--gzip' : null
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')
|
||||
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: 'serve',
|
||||
script: 'npm run serve -- public',
|
||||
instances: 1,
|
||||
watch: false,
|
||||
autorestart: true
|
||||
},
|
||||
{
|
||||
name: 'grab',
|
||||
script: `npm run grab -- ${grabArgs}`,
|
||||
cron_restart: process.env.CRON_SCHEDULE,
|
||||
instances: 1,
|
||||
watch: false,
|
||||
autorestart: false
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user