mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 04:29:21 +08:00
fix: JwtUtils 显式绑定 Jackson 序列化,部署上传 jar 后强制 restart 容器
This commit is contained in:
@@ -179,10 +179,17 @@ export async function composeRestartAfterUpload(
|
||||
const running = psOut.trim().length > 0;
|
||||
|
||||
if (running) {
|
||||
const upCmd = `${composeCmd(cfg, env, service)} up -d ${composeService} 2>&1`;
|
||||
const cmd = composeCmd(cfg, env, service);
|
||||
const upCmd = `${cmd} up -d ${composeService} 2>&1`;
|
||||
const { code, stdout, stderr } = await execRemote(conn, upCmd);
|
||||
if (code !== 0) throw new Error(`${service} 应用 compose 失败:\n${stdout || stderr}`);
|
||||
printSuccess(`${composeService} 已更新并运行`);
|
||||
// 仅 up -d 不会 reload 挂载的 app.jar;必须 restart 后 JVM 才读新包
|
||||
const restartCmd = `${cmd} restart ${composeService} 2>&1`;
|
||||
const restarted = await execRemote(conn, restartCmd);
|
||||
if (restarted.code !== 0) {
|
||||
throw new Error(`${service} 重启失败:\n${restarted.stdout || restarted.stderr}`);
|
||||
}
|
||||
printSuccess(`${composeService} 已更新配置并重启`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user