refactor(volumes): rework volumes and paths

This commit is contained in:
Mauricio Siu
2024-07-21 18:02:42 -06:00
parent 63a1039439
commit 2e79c7230f
17 changed files with 3151 additions and 127 deletions

View File

@@ -28,7 +28,7 @@ export const cloneGitRepository = async (
const writeStream = createWriteStream(logPath, { flags: "a" });
const keyPath = path.join(SSH_PATH, `${appName}_rsa`);
const basePath = isCompose ? COMPOSE_PATH : APPLICATIONS_PATH;
const outputPath = join(basePath, appName);
const outputPath = join(basePath, appName, "code");
const knownHostsPath = path.join(SSH_PATH, "known_hosts");
try {

View File

@@ -93,7 +93,7 @@ export const cloneGithubRepository = async (
});
}
const basePath = isCompose ? COMPOSE_PATH : APPLICATIONS_PATH;
const outputPath = join(basePath, appName);
const outputPath = join(basePath, appName, "code");
const octokit = authGithub(admin);
const token = await getGithubToken(octokit);
const repoclone = `github.com/${owner}/${repository}.git`;

View File

@@ -8,7 +8,7 @@ import { recreateDirectory } from "../filesystem/directory";
export const createComposeFile = async (compose: Compose, logPath: string) => {
const { appName, composeFile } = compose;
const writeStream = createWriteStream(logPath, { flags: "a" });
const outputPath = join(COMPOSE_PATH, appName);
const outputPath = join(COMPOSE_PATH, appName, "code");
try {
await recreateDirectory(outputPath);