From 95585ffcd6913d28342bd41f5c8e5657823123da Mon Sep 17 00:00:00 2001 From: Zakaria Mansouri Date: Sat, 12 Apr 2025 14:06:45 +0200 Subject: [PATCH 1/2] take down running containers before building --- api/oracle-cloud/deploy.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/api/oracle-cloud/deploy.ts b/api/oracle-cloud/deploy.ts index 2c6e68f8..0d4616d9 100644 --- a/api/oracle-cloud/deploy.ts +++ b/api/oracle-cloud/deploy.ts @@ -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( @@ -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( From 52d4d5e2dcd035a9dcae69537103bc8411a7def5 Mon Sep 17 00:00:00 2001 From: Zakaria Mansouri Date: Sat, 12 Apr 2025 14:06:56 +0200 Subject: [PATCH 2/2] fixe type typo --- api/src/bitbucket/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/bitbucket/types.ts b/api/src/bitbucket/types.ts index 4cc5de83..a924ab40 100644 --- a/api/src/bitbucket/types.ts +++ b/api/src/bitbucket/types.ts @@ -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"; }