mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
Merge branch 'main' into next
This commit is contained in:
commit
b979e8b71a
@ -48,6 +48,7 @@ module.exports = (cli) => {
|
||||
.option('-i, --instances [instances]')
|
||||
.option('--db-sync')
|
||||
.option('--quickstart')
|
||||
.option('--launch-mode [launchMode]')
|
||||
.allowUnknownOption()
|
||||
.action(async (opts) => {
|
||||
checkDBDialect();
|
||||
@ -119,17 +120,27 @@ module.exports = (cli) => {
|
||||
]);
|
||||
process.exit();
|
||||
} else {
|
||||
run(
|
||||
'pm2-runtime',
|
||||
[
|
||||
'start',
|
||||
...instancesArgs,
|
||||
`${APP_PACKAGE_ROOT}/lib/index.js`,
|
||||
NODE_ARGS ? `--node-args="${NODE_ARGS}"` : undefined,
|
||||
'--',
|
||||
...process.argv.slice(2),
|
||||
].filter(Boolean),
|
||||
);
|
||||
const launchMode = opts.launchMode || process.env.APP_LAUNCH_MODE || 'pm2';
|
||||
if (launchMode === 'pm2') {
|
||||
run(
|
||||
'pm2-runtime',
|
||||
[
|
||||
'start',
|
||||
...instancesArgs,
|
||||
`${APP_PACKAGE_ROOT}/lib/index.js`,
|
||||
NODE_ARGS ? `--node-args="${NODE_ARGS}"` : undefined,
|
||||
'--',
|
||||
...process.argv.slice(2),
|
||||
].filter(Boolean),
|
||||
);
|
||||
} else {
|
||||
run(
|
||||
'node',
|
||||
[`${APP_PACKAGE_ROOT}/lib/index.js`, ...(NODE_ARGS || '').split(' '), ...process.argv.slice(2)].filter(
|
||||
Boolean,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user