42 lines
1.0 KiB
JavaScript
42 lines
1.0 KiB
JavaScript
/**
|
|
* PM2 — EventBuzz Virtual Concierge API + LiveKit voice worker (same server as backend).
|
|
*
|
|
* cd /var/www/concierge && pm2 start ecosystem.config.cjs
|
|
* pm2 save
|
|
*
|
|
* Requires concierge/.env on the server (MONGODB_URI, AWS/Bedrock, MAIL_*, LIVEKIT_*).
|
|
* Prefer HOST=0.0.0.0 (or nginx → 127.0.0.1:3010 with HOST=localhost).
|
|
*
|
|
* LiveKit voice: LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET.
|
|
* One worker instance only (it registers with LiveKit Cloud).
|
|
*/
|
|
module.exports = {
|
|
apps: [
|
|
{
|
|
name: 'concierge-api',
|
|
script: 'server.js',
|
|
instances: 1,
|
|
exec_mode: 'fork',
|
|
autorestart: true,
|
|
max_restarts: 20,
|
|
restart_delay: 5000,
|
|
env: {
|
|
NODE_ENV: 'production',
|
|
},
|
|
},
|
|
{
|
|
name: 'livekit-voice-worker',
|
|
script: 'src/workers/livekitVoiceAgent.js',
|
|
args: 'start',
|
|
instances: 1,
|
|
exec_mode: 'fork',
|
|
autorestart: true,
|
|
max_restarts: 20,
|
|
restart_delay: 5000,
|
|
env: {
|
|
NODE_ENV: 'production',
|
|
},
|
|
},
|
|
],
|
|
};
|