Qual é a sua dúvida?
Ecosystem PM2
Crie o arquivo ecosystem.config.js
$ pm2 ecosystem
Insira o conteúdo abaixo para subir o ambiente Chassi
module.exports = {
apps: [{
name: "directory",
script: "index.js",
cwd: "./acd/directory/",
log_date_format: "YYYY-MM-DD HH:mm:ss.SSS",
error_file: "../../directory_err.log",
out_file: "../../directory_out.log"
},
{
name: "dealer",
script: "index.js",
cwd: "./acd/dealer/",
log_date_format: "YYYY-MM-DD HH:mm:ss.SSS",
error_file: "../../dealer_err.log",
out_file: "../../dealer_out.log"
},
{
name: "contact",
script: "index.js",
cwd: "./acd/contact/",
log_date_format: "YYYY-MM-DD HH:mm:ss.SSS",
error_file: "../../contact_err.log",
out_file: "../../contact_out.log"
},
{
name: "flow",
script: "index.js",
cwd: "./worker/flow/",
log_date_format: "YYYY-MM-DD HH:mm:ss.SSS",
error_file: "../../flow_err.log",
out_file: "../../flow_out.log"
},
{
name: "queue",
script: "index.js",
cwd: "./worker/queue/",
log_date_format: "YYYY-MM-DD HH:mm:ss.SSS",
error_file: "../../queue_err.log",
out_file: "../../queue_out.log"
}
]
}
Fique atento com o path do arquivo de log, preferencialmente utilize o endereço absoluto
https://pm2.keymetrics.io/docs/usage/application-declaration/
tags: pm2 ecosystem