From 1f4973605dc3e38e87febb5c917eeb7b7d8c86ac Mon Sep 17 00:00:00 2001 From: Wildan M Date: Wed, 9 Oct 2024 19:50:35 +0700 Subject: [PATCH] Correct dir --- src/executor/runnersub.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/executor/runnersub.js b/src/executor/runnersub.js index 137bef5..4b4e33d 100644 --- a/src/executor/runnersub.js +++ b/src/executor/runnersub.js @@ -353,6 +353,13 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec, await writeLog("$> Changing root path for safety"); await featureRunner("root public_html/public"); } + if (typeof services == 'string' && services.includes('/')) { + const subDir = services.substring(0, services.lastIndexOf('/')); + await sshExec(`cd ${htmlDir}/${subDir}`, false); + } else { + await sshExec(`cd ${htmlDir}`, false); + } + await writeLog("$> Removing docker compose services if exists"); await sshExec(`docker compose ${addFlags} --progress quiet down --remove-orphans || true`); await writeLog("$> Configuring NGINX forwarding for docker");