Skip to content

Commit 3e90297

Browse files
committed
Enhance SSH command options for improved connection stability during deployment
1 parent c374591 commit 3e90297

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

api/oracle-cloud/deploy.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ const sshServer = isProduction ? process.env.SSH_ADDRESS_PRD : process.env.SSH_A
5050
const sshKeyPath = process.env.SSH_PATH;
5151
const appPath = "~/app";
5252
const sshPrefix =
53-
"ssh -o StrictHostKeyChecking=no " + (sshKeyPath ? `-i ${sshKeyPath} ` : "") + sshServer + " ";
53+
"ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -o ServerAliveCountMax=60 " +
54+
(sshKeyPath ? `-i ${sshKeyPath} ` : "") +
55+
sshServer +
56+
" ";
5457

5558
console.log("⚠️ Cleaning up old containers ...");
5659
logs = execSync(sshPrefix + '"sudo docker container prune --force"');

0 commit comments

Comments
 (0)