From 5305bc1ceb088294de11122f82a5df1d108728cb Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 5 Sep 2022 10:17:52 +0200 Subject: [PATCH] debug on --- apps/api/src/routes/api/v1/destinations/handlers.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/api/src/routes/api/v1/destinations/handlers.ts b/apps/api/src/routes/api/v1/destinations/handlers.ts index effd1e8f0..8b0bb5fc8 100644 --- a/apps/api/src/routes/api/v1/destinations/handlers.ts +++ b/apps/api/src/routes/api/v1/destinations/handlers.ts @@ -212,21 +212,25 @@ export async function verifyRemoteDockerEngine(request: FastifyRequest, const { remoteIpAddress, remoteUser, network, isCoolifyProxyUsed } = await prisma.destinationDocker.findFirst({ where: { id } }) const host = `ssh://${remoteUser}@${remoteIpAddress}` + console.log({ host }) const { stdout } = await asyncExecShell(`DOCKER_HOST=${host} docker network ls --filter 'name=${network}' --no-trunc --format "{{json .}}"`); - + console.log({ stdout }) if (!stdout) { await asyncExecShell(`DOCKER_HOST=${host} docker network create --attachable ${network}`); } const { stdout: coolifyNetwork } = await asyncExecShell(`DOCKER_HOST=${host} docker network ls --filter 'name=coolify-infra' --no-trunc --format "{{json .}}"`); + console.log({ coolifyNetwork }) if (!coolifyNetwork) { await asyncExecShell(`DOCKER_HOST=${host} docker network create --attachable coolify-infra`); } + console.log({ isCoolifyProxyUsed }) if (isCoolifyProxyUsed) await startTraefikProxy(id); await prisma.destinationDocker.update({ where: { id }, data: { remoteVerified: true } }) return reply.code(201).send() } catch ({ status, message }) { + console.log({ status, message }) return errorHandler({ status, message }) } }