refactor(builder): removed unused and redundant code

This commit is contained in:
xenonwellz
2024-11-02 12:42:53 +01:00
parent 06081627e8
commit 9c355bcfb7

View File

@@ -2,14 +2,12 @@ import {
createWriteStream, createWriteStream,
existsSync, existsSync,
mkdirSync, mkdirSync,
readFileSync,
writeFileSync, writeFileSync,
} from "node:fs"; } from "node:fs";
import { dirname, join } from "node:path"; import { dirname, join } from "node:path";
import { paths } from "@dokploy/server/constants"; import { paths } from "@dokploy/server/constants";
import type { InferResultType } from "@dokploy/server/types/with"; import type { InferResultType } from "@dokploy/server/types/with";
import boxen from "boxen"; import boxen from "boxen";
import dotenv from "dotenv";
import { import {
writeDomainsToCompose, writeDomainsToCompose,
writeDomainsToComposeRemote, writeDomainsToComposeRemote,
@@ -196,10 +194,9 @@ const createEnvFile = (compose: ComposeNested) => {
export const processComposeFile = async (compose: ComposeNested) => { export const processComposeFile = async (compose: ComposeNested) => {
const { COMPOSE_PATH } = paths(); const { COMPOSE_PATH } = paths();
let command = getProcessComposeFileCommand(compose); const command = getProcessComposeFileCommand(compose);
if (compose.serverId) { if (compose.serverId) {
command = `cd ${join(COMPOSE_PATH, compose.appName, "code")} && ${command}`;
await execAsyncRemote(compose.serverId, command); await execAsyncRemote(compose.serverId, command);
} else { } else {
await execAsync(command, { await execAsync(command, {