[as 2] as config로 pm2 로 시작 하기 위한 방법
This commit is contained in:
+4
-54
@@ -19,62 +19,12 @@ module.exports = {
|
||||
{
|
||||
...common,
|
||||
|
||||
name: 'cs-app',
|
||||
cwd: './apps/cs',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 3000',
|
||||
|
||||
error_file: './logs/cs-error.log',
|
||||
out_file: './logs/cs-out.log',
|
||||
},
|
||||
{
|
||||
...common,
|
||||
|
||||
name: 'st-app',
|
||||
cwd: './apps/st',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 3001',
|
||||
|
||||
error_file: './logs/st-error.log',
|
||||
out_file: './logs/st-out.log',
|
||||
},
|
||||
{
|
||||
...common,
|
||||
|
||||
name: 'cm-app',
|
||||
cwd: './apps/cm',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 3002',
|
||||
|
||||
error_file: './logs/cm-error.log',
|
||||
out_file: './logs/cm-out.log',
|
||||
},
|
||||
{
|
||||
...common,
|
||||
|
||||
name: 'as-app',
|
||||
name: 'as2-app',
|
||||
cwd: './apps/as',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 3004',
|
||||
|
||||
error_file: './logs/cm-error.log',
|
||||
out_file: './logs/cm-out.log',
|
||||
},
|
||||
{
|
||||
...common,
|
||||
|
||||
name: 'features-app',
|
||||
cwd: './apps/common/features',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 13000',
|
||||
|
||||
error_file: './logs/feature-error.log',
|
||||
out_file: './logs/feature-out.log',
|
||||
},
|
||||
error_file: './logs/as2-error.log',
|
||||
out_file: './logs/as2-out.log',
|
||||
}
|
||||
],
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
const common = {
|
||||
exec_mode: 'cluster',
|
||||
instances: 2,
|
||||
|
||||
autorestart: true,
|
||||
max_memory_restart: '1G',
|
||||
watch: false,
|
||||
|
||||
merge_logs: true,
|
||||
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
|
||||
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
...common,
|
||||
|
||||
name: 'cs-app',
|
||||
cwd: './apps/cs',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 3000',
|
||||
|
||||
error_file: './logs/cs-error.log',
|
||||
out_file: './logs/cs-out.log',
|
||||
},
|
||||
{
|
||||
...common,
|
||||
|
||||
name: 'st-app',
|
||||
cwd: './apps/st',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 3001',
|
||||
|
||||
error_file: './logs/st-error.log',
|
||||
out_file: './logs/st-out.log',
|
||||
},
|
||||
{
|
||||
...common,
|
||||
|
||||
name: 'cm-app',
|
||||
cwd: './apps/cm',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 3002',
|
||||
|
||||
error_file: './logs/cm-error.log',
|
||||
out_file: './logs/cm-out.log',
|
||||
},
|
||||
{
|
||||
...common,
|
||||
|
||||
name: 'as-app',
|
||||
cwd: './apps/as',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 3004',
|
||||
|
||||
error_file: './logs/cm-error.log',
|
||||
out_file: './logs/cm-out.log',
|
||||
},
|
||||
{
|
||||
...common,
|
||||
|
||||
name: 'features-app',
|
||||
cwd: './apps/common/features',
|
||||
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start -p 13000',
|
||||
|
||||
error_file: './logs/feature-error.log',
|
||||
out_file: './logs/feature-out.log',
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user