fix: cleanup stucked tcp proxies
This commit is contained in:
parent
6dbf53b558
commit
3f76cadea9
@ -146,12 +146,9 @@ async function checkProxies() {
|
|||||||
const { destinationDockerId, destinationDocker, publicPort, id } = database;
|
const { destinationDockerId, destinationDocker, publicPort, id } = database;
|
||||||
if (destinationDockerId && destinationDocker.isCoolifyProxyUsed) {
|
if (destinationDockerId && destinationDocker.isCoolifyProxyUsed) {
|
||||||
const { privatePort } = generateDatabaseConfiguration(database, arch);
|
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({
|
const wordpressWithFtp = await prisma.wordpress.findMany({
|
||||||
where: { ftpPublicPort: { not: null } },
|
where: { ftpPublicPort: { not: null } },
|
||||||
include: { service: { include: { destinationDocker: true } } }
|
include: { service: { include: { destinationDocker: true } } }
|
||||||
@ -160,12 +157,9 @@ async function checkProxies() {
|
|||||||
const { service, ftpPublicPort } = ftp;
|
const { service, ftpPublicPort } = ftp;
|
||||||
const { destinationDockerId, destinationDocker, id } = service;
|
const { destinationDockerId, destinationDocker, id } = service;
|
||||||
if (destinationDockerId && destinationDocker.isCoolifyProxyUsed) {
|
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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// HTTP Proxies
|
// HTTP Proxies
|
||||||
const minioInstances = await prisma.minio.findMany({
|
const minioInstances = await prisma.minio.findMany({
|
||||||
@ -176,12 +170,9 @@ async function checkProxies() {
|
|||||||
const { service, publicPort } = minio;
|
const { service, publicPort } = minio;
|
||||||
const { destinationDockerId, destinationDocker, id } = service;
|
const { destinationDockerId, destinationDocker, id } = service;
|
||||||
if (destinationDockerId && destinationDocker.isCoolifyProxyUsed) {
|
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) {
|
} catch (error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user