fix: do not start tcp proxy without main container
This commit is contained in:
@@ -146,7 +146,7 @@ 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: destinationDocker.remoteIpAddress || ipv4 || ipv6 })
|
portReachable = await isReachable(publicPort, { host: isDev ? 'localhost' : destinationDocker.remoteIpAddress || ipv4 || ipv6 })
|
||||||
if (!portReachable) {
|
if (!portReachable) {
|
||||||
await startTraefikTCPProxy(destinationDocker, id, publicPort, privatePort);
|
await startTraefikTCPProxy(destinationDocker, id, publicPort, privatePort);
|
||||||
}
|
}
|
||||||
@@ -160,7 +160,7 @@ 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: destinationDocker.remoteIpAddress || ipv4 || ipv6 })
|
portReachable = await isReachable(ftpPublicPort, { host: isDev ? 'localhost' : destinationDocker.remoteIpAddress || ipv4 || ipv6 })
|
||||||
if (!portReachable) {
|
if (!portReachable) {
|
||||||
await startTraefikTCPProxy(destinationDocker, id, ftpPublicPort, 22, 'wordpressftp');
|
await startTraefikTCPProxy(destinationDocker, id, ftpPublicPort, 22, 'wordpressftp');
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@ 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: destinationDocker.remoteIpAddress || ipv4 || ipv6 })
|
portReachable = await isReachable(publicPort, { host: isDev ? 'localhost' : destinationDocker.remoteIpAddress || ipv4 || ipv6 })
|
||||||
if (!portReachable) {
|
if (!portReachable) {
|
||||||
await startTraefikTCPProxy(destinationDocker, id, publicPort, 9000);
|
await startTraefikTCPProxy(destinationDocker, id, publicPort, 9000);
|
||||||
}
|
}
|
||||||
|
@@ -1365,7 +1365,7 @@ export async function startTraefikTCPProxy(
|
|||||||
|
|
||||||
let dependentId = id;
|
let dependentId = id;
|
||||||
if (type === 'wordpressftp') dependentId = `${id}-ftp`;
|
if (type === 'wordpressftp') dependentId = `${id}-ftp`;
|
||||||
const foundDependentContainer = await checkContainer({
|
const { found: foundDependentContainer } = await checkContainer({
|
||||||
dockerId,
|
dockerId,
|
||||||
container: dependentId,
|
container: dependentId,
|
||||||
remove: true
|
remove: true
|
||||||
|
Reference in New Issue
Block a user