-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecosystem.config.js
More file actions
53 lines (51 loc) · 1.32 KB
/
ecosystem.config.js
File metadata and controls
53 lines (51 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// PM2 Ecosystem Configuration for Content Forge AI Standalone
// Install PM2: npm install -g pm2
// Start: pm2 start ecosystem.config.js
// Stop: pm2 stop ecosystem.config.js
// Logs: pm2 logs
// Status: pm2 status
module.exports = {
apps: [
{
name: 'content-forge-ai-api',
script: './server.js',
instances: 1,
exec_mode: 'fork',
env: {
NODE_ENV: 'production',
PORT: 5000,
BACKEND_PORT: 5000,
},
env_production: {
NODE_ENV: 'production',
PORT: 5000,
BACKEND_PORT: 5000,
},
error_file: './logs/api-error.log',
out_file: './logs/api-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
autorestart: true,
watch: false,
max_memory_restart: '500M',
},
// If you want to run Vite preview (optional)
// {
// name: 'content-forge-ai-frontend',
// script: 'npm',
// args: 'run preview',
// cwd: './',
// instances: 1,
// exec_mode: 'fork',
// env: {
// NODE_ENV: 'production',
// },
// error_file: './logs/frontend-error.log',
// out_file: './logs/frontend-out.log',
// log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
// merge_logs: true,
// autorestart: true,
// watch: false,
// },
],
};