mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor(builder): removed unused and redundant code
This commit is contained in:
@@ -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, {
|
||||||
|
|||||||
Reference in New Issue
Block a user