feat: adiciona configuração do PM2 para gerenciamento de processos
This commit is contained in:
29
ecosystem.config.js
Normal file
29
ecosystem.config.js
Normal file
@@ -0,0 +1,29 @@
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: 'portaljuru-api',
|
||||
script: 'dist/main.js',
|
||||
instances: 1,
|
||||
exec_mode: 'fork',
|
||||
interpreter: 'node',
|
||||
interpreter_args: '-r newrelic',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
TZ: 'America/Sao_Paulo',
|
||||
},
|
||||
error_file: './logs/pm2-error.log',
|
||||
out_file: './logs/pm2-out.log',
|
||||
log_file: './logs/pm2-combined.log',
|
||||
time: true,
|
||||
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
|
||||
merge_logs: true,
|
||||
autorestart: true,
|
||||
max_restarts: 10,
|
||||
min_uptime: '10s',
|
||||
max_memory_restart: '1G',
|
||||
watch: false,
|
||||
ignore_watch: ['node_modules', 'logs', 'dist'],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user