From 3f76cadea9b988f96d58f47cdda3c0703da5b38a Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 29 Sep 2022 14:44:20 +0200 Subject: [PATCH] fix: cleanup stucked tcp proxies --- apps/api/src/jobs/infrastructure.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/apps/api/src/jobs/infrastructure.ts b/apps/api/src/jobs/infrastructure.ts index d14a118ba..2bd9c329d 100644 --- a/apps/api/src/jobs/infrastructure.ts +++ b/apps/api/src/jobs/infrastructure.ts @@ -146,10 +146,7 @@ async function checkProxies() { const { destinationDockerId, destinationDocker, publicPort, id } = database; if (destinationDockerId && destinationDocker.isCoolifyProxyUsed) { const { privatePort } = generateDatabaseConfiguration(database, arch); - portReachable = await isReachable(publicPort, { host: isDev ? 'localhost' : destinationDocker.remoteIpAddress || ipv4 || ipv6 }) - if (!portReachable) { - await startTraefikTCPProxy(destinationDocker, id, publicPort, privatePort); - } + await startTraefikTCPProxy(destinationDocker, id, publicPort, privatePort); } } const wordpressWithFtp = await prisma.wordpress.findMany({ @@ -160,10 +157,7 @@ async function checkProxies() { const { service, ftpPublicPort } = ftp; const { destinationDockerId, destinationDocker, id } = service; if (destinationDockerId && destinationDocker.isCoolifyProxyUsed) { - portReachable = await isReachable(ftpPublicPort, { host: isDev ? 'localhost' : destinationDocker.remoteIpAddress || ipv4 || ipv6 }) - if (!portReachable) { - await startTraefikTCPProxy(destinationDocker, id, ftpPublicPort, 22, 'wordpressftp'); - } + await startTraefikTCPProxy(destinationDocker, id, ftpPublicPort, 22, 'wordpressftp'); } } @@ -176,10 +170,7 @@ async function checkProxies() { const { service, publicPort } = minio; const { destinationDockerId, destinationDocker, id } = service; if (destinationDockerId && destinationDocker.isCoolifyProxyUsed) { - portReachable = await isReachable(publicPort, { host: isDev ? 'localhost' : destinationDocker.remoteIpAddress || ipv4 || ipv6 }) - if (!portReachable) { - await startTraefikTCPProxy(destinationDocker, id, publicPort, 9000); - } + await startTraefikTCPProxy(destinationDocker, id, publicPort, 9000); } } } catch (error) {