-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecosystem.config.js
More file actions
33 lines (33 loc) · 1.67 KB
/
ecosystem.config.js
File metadata and controls
33 lines (33 loc) · 1.67 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
module.exports = {
apps: [
{
name: "mobius-admin",
script: "npm",
args: "start",
// args: "startServer",
autorestart: true,
// watch: true, // 프로젝트가 리스타트되거나 파일이 체인지 될경우를 와칭시켜줌
instances: 4, // 인스턴스를 일단 4개정도 띄운다.
exec_mode: "cluster", // 실행모드 cluster로 명시하지 않으면 기본 fork모드로 실행됨
wait_ready: true, // Node앱으로 부터 앱이 실행되었다는 신호를 받기위해 기다리겠다는 것 "ready"
listen_timeout: 50000, // 앱 실행신호까지 기다릴 최대시간 ms단위 50초
kill_timeout: 5000, //새로운 프로세스 실행이 완료된 후 예전 프로세스를 교체하기까지 기다릴 시간 5초
max_memory_restart: "2G", // 프로그램의 메모리 크기가 일정 크기 이상이 되면 재시작시킴
log_rotate: true, // 로그 로테이션 활성화
log_file: 'logs/combined.log', // 로그 파일 경로
log_date_format: 'YYYY-MM-DD HH:mm', // 로그 타임스탬프 형식
max_size: '10M', // 최대 파일 크기 (예: 10MB)
max_logs: 30, // 최대 파일 개수 (예: 30개)
merge_logs: true, // 모든 인스턴스의 로그를 하나의 파일로 병합 (선택 사항)
// 개발환경 설정
env: {
NODE_ENV: "development",
},
// 운영환경 설정 실행시 --env production 옵션으로 지정할 수 있다.
env_production: {
NODE_ENV: "production",
PORT: "3000",
},
},
],
};