From 46a83aa457d52b7e6f4e4267c7bb74b838877633 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 2 Jun 2022 11:13:14 +0200 Subject: [PATCH 1/2] chore: version++ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a5d41d606..35224769f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coolify", "description": "An open-source & self-hostable Heroku / Netlify alternative.", - "version": "2.9.4", + "version": "2.9.5", "license": "AGPL-3.0", "scripts": { "dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev --host 0.0.0.0", From 32d94cbe97d7caae3102d8cb06cef726e68cd281 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 2 Jun 2022 11:13:27 +0200 Subject: [PATCH 2/2] fix: proxy stop missing argument --- src/routes/databases/[id]/delete.json.ts | 2 +- src/routes/databases/[id]/settings.json.ts | 2 +- src/routes/databases/[id]/stop.json.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/routes/databases/[id]/delete.json.ts b/src/routes/databases/[id]/delete.json.ts index d731492ad..71c05130c 100644 --- a/src/routes/databases/[id]/delete.json.ts +++ b/src/routes/databases/[id]/delete.json.ts @@ -12,7 +12,7 @@ export const del: RequestHandler = async (event) => { const database = await db.getDatabase({ id, teamId }); if (database.destinationDockerId) { const everStarted = await stopDatabase(database); - if (everStarted) await stopTcpHttpProxy(database.destinationDocker, database.publicPort); + if (everStarted) await stopTcpHttpProxy(id, database.destinationDocker, database.publicPort); } await db.removeDatabase({ id }); return { status: 200 }; diff --git a/src/routes/databases/[id]/settings.json.ts b/src/routes/databases/[id]/settings.json.ts index e4263ce9a..1c2002890 100644 --- a/src/routes/databases/[id]/settings.json.ts +++ b/src/routes/databases/[id]/settings.json.ts @@ -29,7 +29,7 @@ export const post: RequestHandler = async (event) => { } } else { await db.prisma.database.update({ where: { id }, data: { publicPort: null } }); - await stopTcpHttpProxy(destinationDocker, oldPublicPort); + await stopTcpHttpProxy(id, destinationDocker, oldPublicPort); } } return { diff --git a/src/routes/databases/[id]/stop.json.ts b/src/routes/databases/[id]/stop.json.ts index 6bd4f4c19..15c5c6e41 100644 --- a/src/routes/databases/[id]/stop.json.ts +++ b/src/routes/databases/[id]/stop.json.ts @@ -13,7 +13,7 @@ export const post: RequestHandler = async (event) => { try { const database = await db.getDatabase({ id, teamId }); const everStarted = await stopDatabase(database); - if (everStarted) await stopTcpHttpProxy(database.destinationDocker, database.publicPort); + if (everStarted) await stopTcpHttpProxy(id, database.destinationDocker, database.publicPort); await db.setDatabase({ id, isPublic: false }); await db.prisma.database.update({ where: { id }, data: { publicPort: null } }); @@ -21,6 +21,7 @@ export const post: RequestHandler = async (event) => { status: 200 }; } catch (error) { + console.log(error); return ErrorHandler(error); } };