Edit: /opt/canhelp/ecosystem.config.js (983B)
module.exports = {
apps: [
{
name: 'canhelp-api',
cwd: '/opt/canhelp/apps/api',
script: '/opt/canhelp/node_modules/.bin/tsx',
args: '--env-file=/opt/canhelp/.env src/index.ts',
env_file: '/opt/canhelp/.env',
env: { NODE_ENV: 'production' },
instances: 1,
exec_mode: 'fork',
autorestart: true,
max_restarts: 10,
min_uptime: '10s',
max_memory_restart: '400M',
error_file: '/opt/canhelp/logs/api-error.log',
time: true,
},
{
name: 'canhelp-web',
cwd: '/opt/canhelp/apps/web',
script: '/opt/canhelp/node_modules/.bin/next',
args: 'start --port 3000',
env_file: '/opt/canhelp/.env',
env: { NODE_ENV: 'production' },
instances: 1,
exec_mode: 'fork',
autorestart: true,
max_restarts: 10,
min_uptime: '10s',
max_memory_restart: '600M',
error_file: '/opt/canhelp/logs/web-error.log',
time: true,
},
],
}