FIX_AUTO_DEPLOYE

This commit is contained in:
velz 2025-10-29 18:46:27 +05:30
parent d7a18bb216
commit 14f8f5410a

View File

@ -100,9 +100,10 @@ exports.deployment = async (req, res) => {
const child = spawn(DEPLOY_SCRIPT, [], {
cwd: path.dirname(DEPLOY_SCRIPT),
env: process.env,
detached: false
detached: true,
stdio: ['ignore', 'ignore', 'ignore'] // detach fully
});
child.unref();
// capture output for logs
child.stdout.on('data', (d) => logger.info('SCRIPT_OUT:' + d.toString().trim()));
child.stderr.on('data', (d) => logger.info('SCRIPT_ERR:' + d.toString().trim()));