Skip to content

Commit 3becfc6

Browse files
committed
refactor: remove old container management logic from deployment script
1 parent 35b341a commit 3becfc6

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

api/oracle-cloud/deploy.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,6 @@ const appPath = "~/app";
5252
const sshPrefix =
5353
"ssh -o StrictHostKeyChecking=no " + (sshKeyPath ? `-i ${sshKeyPath} ` : "") + sshServer + " ";
5454

55-
// todo-ZM: let docker-compose handle deletion of old containers
56-
// Check for existing containers
57-
logs = execSync(sshPrefix + '"sudo docker ps -aq"');
58-
59-
if (String(logs)) {
60-
// stop containers
61-
console.log("⚠️ Stopping all containers ...");
62-
logs = execSync(sshPrefix + '"sudo docker stop \\$(sudo docker ps -aq)"');
63-
console.log(String(logs));
64-
65-
// delete containers
66-
console.log("⚠️ Deleting all containers ...");
67-
logs = execSync(sshPrefix + '"sudo docker rm \\$(sudo docker ps -aq)"');
68-
console.log(String(logs));
69-
console.log("✅ All containers stopped");
70-
} else {
71-
console.log("⏩ No container found, skipping stopping containers.");
72-
}
73-
7455
console.log("⚠️ Deleting old code ...");
7556
logs = execSync(sshPrefix + '"rm -f -r ' + appPath + '"');
7657
logs = execSync(sshPrefix + '"mkdir ' + appPath + '"');

0 commit comments

Comments
 (0)