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('-i, --instances [instances]')
|
||||||
.option('--db-sync')
|
.option('--db-sync')
|
||||||
.option('--quickstart')
|
.option('--quickstart')
|
||||||
|
.option('--launch-mode [launchMode]')
|
||||||
.allowUnknownOption()
|
.allowUnknownOption()
|
||||||
.action(async (opts) => {
|
.action(async (opts) => {
|
||||||
checkDBDialect();
|
checkDBDialect();
|
||||||
@ -119,17 +120,27 @@ module.exports = (cli) => {
|
|||||||
]);
|
]);
|
||||||
process.exit();
|
process.exit();
|
||||||
} else {
|
} else {
|
||||||
run(
|
const launchMode = opts.launchMode || process.env.APP_LAUNCH_MODE || 'pm2';
|
||||||
'pm2-runtime',
|
if (launchMode === 'pm2') {
|
||||||
[
|
run(
|
||||||
'start',
|
'pm2-runtime',
|
||||||
...instancesArgs,
|
[
|
||||||
`${APP_PACKAGE_ROOT}/lib/index.js`,
|
'start',
|
||||||
NODE_ARGS ? `--node-args="${NODE_ARGS}"` : undefined,
|
...instancesArgs,
|
||||||
'--',
|
`${APP_PACKAGE_ROOT}/lib/index.js`,
|
||||||
...process.argv.slice(2),
|
NODE_ARGS ? `--node-args="${NODE_ARGS}"` : undefined,
|
||||||
].filter(Boolean),
|
'--',
|
||||||
);
|
...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