Skip to content

Instantly share code, notes, and snippets.

@paulobunga
Created May 20, 2022 10:09
Show Gist options
  • Save paulobunga/73cac85837b478bf116ad783b70fa4da to your computer and use it in GitHub Desktop.
Save paulobunga/73cac85837b478bf116ad783b70fa4da to your computer and use it in GitHub Desktop.
PM2 Ecosystem
require('dotenv').config()
module.exports = {
apps: [
{
name: 'uhwr.server',
script: './server/app.js',
instances: process.env.INSTANCES_API || 1,
autorestart: true,
watch: process.env.NODE_ENV == 'development' ? ['server', '*.js', '*.ts', '.env'] : false,
watch_delay: 5000,
ignore_watch: ['node_modules', 'assets', 'docs', 'newrelic_agent.log', '.git'],
max_memory_restart: process.env.APP_MEMORY_LIMIT || '2G',
},
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment