Skip to content

Commit f26ff65

Browse files
authored
Merge pull request #652 from dzcode-io/fix/force-rebuild-api-docker-image
fix: take down running containers before building
2 parents 6af62bc + 52d4d5e commit f26ff65

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

api/oracle-cloud/deploy.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ console.log(String(logs));
6565

6666
console.log("⚠️ Deleting old code ...");
6767
logs = execSync(sshPrefix + '"rm -f -r ' + appPath + '"');
68+
console.log(String(logs));
6869
logs = execSync(sshPrefix + '"mkdir ' + appPath + '"');
70+
console.log(String(logs));
6971

7072
console.log("⤴️ Uploading new code ...");
7173
logs = execSync(
@@ -76,7 +78,14 @@ logs = execSync(
7678
":" +
7779
appPath,
7880
);
79-
console.log("✅ New code uploaded.");
81+
console.log(String(logs));
82+
83+
// note-zm: we must take down the containers before starting them up, our weak VPS can not handle
84+
// the load of running containers and building new ones at the same time
85+
// todo-zm: build images in CI and push to private Github registry, so our VPS will only pull the images
86+
console.log("⚙️ Taking down running containers ...");
87+
logs = execSync(sshPrefix + '"cd ' + appPath + ' && docker compose down --remove-orphans"');
88+
console.log(String(logs));
8089

8190
console.log("\n⚙️ Starting up the app");
8291
logs = execSync(

api/src/bitbucket/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export interface BitbucketUser {
33
username?: string;
44
display_name: string;
55
nickname?: string;
6-
links: { avatar: { href: "https://bitbucket.org/account/open-listings/avatar/" } };
6+
links: { avatar: { href: string } };
77
type: "user" | "team";
88
}
99

0 commit comments

Comments
 (0)