Files
MoneyFlix/nodejs-redirector/ecosystem.config.cjs
T
Xika 03e0e557ef fix: remove hardcoded credentials from Git (BIT-1876)
SEV-1: Remove hardcoded credentials per BIT-1876 credential safety rules.

Changes:
- moneyflix.config: Remove DB_PASS and API_KEY plaintext values
- nodejs-redirector/ecosystem.config.cjs: Use process.env for sensitive credentials
- README_MONEYFLIX.md: Replace real credentials with placeholders
- nodejs-redirector/README.md: Replace real credentials with placeholders
- README.md: Replace real credentials with placeholders
- docs/MONEYFLIX_CLIENT_CONFIGURATION.md: Replace real credentials with placeholders
- docs/README.md: Replace real credentials with placeholders
- crm/README.md: Replace real credentials with placeholders
- Add credentials-hygiene-plan.md for reference

Note: This removes credentials from Git but does NOT change production values.
Production credential rotation requires explicit human approval.

Paperclip-*:
- Issue: BIT-24692
- Agent: e34f1b0f-62db-487c-8584-f6a47203f7b5
- UrlKey: nelson-baptista
2026-06-08 12:43:01 +00:00

44 lines
1.2 KiB
JavaScript

module.exports = {
apps: [{
name: 'moneyflix-redirector',
script: 'index.mjs',
instances: 1,
exec_mode: 'cluster',
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: process.env.DB_PASSWORD || '',
DB_DATABASE: 'redirects_moneyflix',
CRM_API_URL: 'https://redirect.moneyflix.com/api/redirects',
CRM_API_KEY: process.env.CRM_API_KEY || '',
TZ: 'Europe/Lisbon'
// NOTA: DB_PASSWORD e CRM_API_KEY devem ser definidos em .env
// NUNCA commitar valores reais aqui (BIT-1876)
},
// 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
}]
};