Commit e3cf3d9f authored by 王曜嵚 Wang Yaoqin's avatar 王曜嵚 Wang Yaoqin

dev: 删除旧日志

parent 830aaca7
......@@ -155,15 +155,12 @@ class Docker {
}
}
async preStartSystem ({ container, username, platform }: { container: Dockerode.Container, username: string, platform: 'v1' | 'v2' }) {
try {
await this.execContainerCommand({ container, cmd: 'rm /root/.pm2/logs/backend-out.log'})
await this.execContainerCommand({ container, cmd: 'rm /root/.pm2/logs/backend-error.log'})
await this.execContainerCommand({ container, cmd: 'rm /root/.pm2/logs/gateway-out.log'})
await this.execContainerCommand({ container, cmd: 'rm /root/.pm2/logs/gateway-out.log'})
await this.execContainerCommand({ container, cmd: 'rm /root/.pm2/logs/platform-out.log'})
await this.execContainerCommand({ container, cmd: 'rm /root/.pm2/logs/platform-out.log'})
} catch (err) {
}
await this.execContainerCommand({ container, cmd: 'rm -f /root/.pm2/logs/backend-out.log'})
await this.execContainerCommand({ container, cmd: 'rm -f /root/.pm2/logs/backend-error.log'})
await this.execContainerCommand({ container, cmd: 'rm -f /root/.pm2/logs/gateway-out.log'})
await this.execContainerCommand({ container, cmd: 'rm -f /root/.pm2/logs/gateway-error.log'})
await this.execContainerCommand({ container, cmd: 'rm -f /root/.pm2/logs/platform-out.log'})
await this.execContainerCommand({ container, cmd: 'rm -f /root/.pm2/logs/platform-error.log'})
try { await this.execContainerCommand({ container, cmd: 'pm2 delete backend' }) } catch (err) {}
try { await this.execContainerCommand({ container, cmd: 'pm2 delete gateway' }) } catch (err) {}
try { await this.execContainerCommand({ container, cmd: 'pm2 delete platform' }) } catch (err) {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment