mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 01:20:08 -04:00
wip
This commit is contained in:
parent
1b62393008
commit
aeaef329e7
1 changed files with 29 additions and 0 deletions
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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue