Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion api/oracle-cloud/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ console.log(String(logs));

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

console.log("⤴️ Uploading new code ...");
logs = execSync(
Expand All @@ -76,7 +78,14 @@ logs = execSync(
":" +
appPath,
);
console.log("✅ New code uploaded.");
console.log(String(logs));

// note-zm: we must take down the containers before starting them up, our weak VPS can not handle
// the load of running containers and building new ones at the same time
// todo-zm: build images in CI and push to private Github registry, so our VPS will only pull the images
console.log("⚙️ Taking down running containers ...");
logs = execSync(sshPrefix + '"cd ' + appPath + ' && docker compose down --remove-orphans"');
console.log(String(logs));

console.log("\n⚙️ Starting up the app");
logs = execSync(
Expand Down
2 changes: 1 addition & 1 deletion api/src/bitbucket/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export interface BitbucketUser {
username?: string;
display_name: string;
nickname?: string;
links: { avatar: { href: "https://bitbucket.org/account/open-listings/avatar/" } };
links: { avatar: { href: string } };
type: "user" | "team";
}

Expand Down
Loading