- Created dedicated nodejs-redirector/ folder for Node.js application - Moved all Node.js files to nodejs-redirector/ directory - Kept CRM PHP code in crm/ folder for clear separation - Updated README_MONEYFLIX.md with new organized structure - Updated sync-from-crm.sh script to work with new structure - Improved project organization for better maintainability This provides clear separation between: - Node.js redirector application (nodejs-redirector/) - CRM PHP code reference (crm/) - Project documentation and scripts (root level)
42 lines
1.0 KiB
JavaScript
42 lines
1.0 KiB
JavaScript
module.exports = {
|
|
apps: [{
|
|
name: 'moneyflix-redirector',
|
|
script: 'index.mjs',
|
|
instances: 1,
|
|
exec_mode: 'cluster',
|
|
user: 'nodejs',
|
|
version: '2.0.1',
|
|
env_file: '.env',
|
|
env: {
|
|
NODE_ENV: 'production',
|
|
PORT: 3001,
|
|
DB_HOST: '127.0.0.1',
|
|
DB_PORT: 3306,
|
|
DB_USER: 'nodejs',
|
|
DB_PASSWORD: 'nodejs123',
|
|
DB_DATABASE: 'redirects_moneyflix',
|
|
CRM_API_URL: 'https://redirect.moneyflix.com/api/redirects',
|
|
CRM_API_KEY: 'moneyflix-api-key-2024'
|
|
},
|
|
// PM2 Configuration
|
|
max_memory_restart: '500M',
|
|
min_uptime: '10s',
|
|
max_restarts: 5,
|
|
restart_delay: 4000,
|
|
|
|
// Logging
|
|
log_file: './logs/combined.log',
|
|
out_file: './logs/out.log',
|
|
error_file: './logs/error.log',
|
|
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
|
|
|
|
// Monitoring
|
|
watch: false,
|
|
ignore_watch: ['node_modules', 'logs'],
|
|
|
|
// Advanced PM2 features
|
|
kill_timeout: 5000,
|
|
listen_timeout: 3000,
|
|
shutdown_with_message: true
|
|
}]
|
|
}; |