Skip to content

Commit deec340

Browse files
committed
fix: reorder cleanup logs for old Docker images and containers in deployment script
1 parent d37fa5e commit deec340

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

api/oracle-cloud/deploy.ts

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

55-
console.log("⚠️ Cleaning up old images ...");
56-
logs = execSync(sshPrefix + '"sudo docker image prune --force"');
57-
console.log(String(logs));
5855
console.log("⚠️ Cleaning up old containers ...");
5956
logs = execSync(sshPrefix + '"sudo docker container prune --force"');
6057
console.log(String(logs));
6158

59+
console.log("⚠️ Cleaning up old images ...");
60+
logs = execSync(sshPrefix + '"sudo docker image prune --force"');
61+
console.log(String(logs));
62+
6263
console.log("⚠️ Deleting old code ...");
6364
logs = execSync(sshPrefix + '"rm -f -r ' + appPath + '"');
6465
logs = execSync(sshPrefix + '"mkdir ' + appPath + '"');

0 commit comments

Comments
 (0)