Added Umami to pm2 ecosystem file.

This commit is contained in:
DebaucheryLibrarian 2023-07-24 22:21:05 +02:00
parent 7d77e0603b
commit bb1aa4aa55
2 changed files with 12 additions and 2 deletions

View File

@ -31,7 +31,7 @@ module.exports = {
}, },
}, },
analytics: { analytics: {
enabled: true, enabled: false,
address: 'http://localhost:3000/script.js', address: 'http://localhost:3000/script.js',
siteId: '1b28ac3b-d229-43bf-aec9-75cf0a72a466', siteId: '1b28ac3b-d229-43bf-aec9-75cf0a72a466',
}, },

View File

@ -1,4 +1,4 @@
// const config = require('config'); const config = require('config');
module.exports = { module.exports = {
apps: [ apps: [
@ -14,5 +14,15 @@ module.exports = {
NODE_ENV: 'production', NODE_ENV: 'production',
}, },
}, },
...(config.analytics.enabled ? [{
name: 'umami',
script: 'npm start',
cwd: process.env.UMAMI_DIR || '../umami',
restart_delay: 3000,
merge_logs: true,
env: {
NODE_ENV: 'production',
},
}] : []),
], ],
}; };