mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
format: fix formatting
This commit is contained in:
parent
fa710d4855
commit
c6892ba188
@ -83,7 +83,7 @@ export const createCompose = async (input: typeof apiCreateCompose._type) => {
|
||||
};
|
||||
|
||||
export const createComposeByTemplate = async (
|
||||
input: typeof compose.$inferInsert
|
||||
input: typeof compose.$inferInsert,
|
||||
) => {
|
||||
const appName = cleanAppName(input.appName);
|
||||
if (appName) {
|
||||
@ -140,7 +140,7 @@ export const findComposeById = async (composeId: string) => {
|
||||
|
||||
export const loadServices = async (
|
||||
composeId: string,
|
||||
type: "fetch" | "cache" = "fetch"
|
||||
type: "fetch" | "cache" = "fetch",
|
||||
) => {
|
||||
const compose = await findComposeById(composeId);
|
||||
|
||||
@ -163,7 +163,7 @@ export const loadServices = async (
|
||||
if (compose.randomize && composeData) {
|
||||
const randomizedCompose = randomizeSpecificationFile(
|
||||
composeData,
|
||||
compose.suffix
|
||||
compose.suffix,
|
||||
);
|
||||
composeData = randomizedCompose;
|
||||
}
|
||||
@ -182,7 +182,7 @@ export const loadServices = async (
|
||||
|
||||
export const updateCompose = async (
|
||||
composeId: string,
|
||||
composeData: Partial<Compose>
|
||||
composeData: Partial<Compose>,
|
||||
) => {
|
||||
const { appName, ...rest } = composeData;
|
||||
const composeResult = await db
|
||||
@ -333,19 +333,19 @@ export const deployRemoteCompose = async ({
|
||||
command += await getGitlabCloneCommand(
|
||||
compose,
|
||||
deployment.logPath,
|
||||
true
|
||||
true,
|
||||
);
|
||||
} else if (compose.sourceType === "bitbucket") {
|
||||
command += await getBitbucketCloneCommand(
|
||||
compose,
|
||||
deployment.logPath,
|
||||
true
|
||||
true,
|
||||
);
|
||||
} else if (compose.sourceType === "git") {
|
||||
command += await getCustomGitCloneCommand(
|
||||
compose,
|
||||
deployment.logPath,
|
||||
true
|
||||
true,
|
||||
);
|
||||
} else if (compose.sourceType === "raw") {
|
||||
command += getCreateComposeFileCommand(compose, deployment.logPath);
|
||||
@ -376,7 +376,7 @@ export const deployRemoteCompose = async ({
|
||||
`
|
||||
echo "\n\n===================================EXTRA LOGS============================================" >> ${deployment.logPath};
|
||||
echo "Error occurred ❌, check the logs for details." >> ${deployment.logPath};
|
||||
echo "${encodedContent}" | base64 -d >> "${deployment.logPath}";`
|
||||
echo "${encodedContent}" | base64 -d >> "${deployment.logPath}";`,
|
||||
);
|
||||
await updateDeploymentStatus(deployment.deploymentId, "error");
|
||||
await updateCompose(composeId, {
|
||||
@ -429,7 +429,7 @@ export const rebuildRemoteCompose = async ({
|
||||
`
|
||||
echo "\n\n===================================EXTRA LOGS============================================" >> ${deployment.logPath};
|
||||
echo "Error occurred ❌, check the logs for details." >> ${deployment.logPath};
|
||||
echo "${encodedContent}" | base64 -d >> "${deployment.logPath}";`
|
||||
echo "${encodedContent}" | base64 -d >> "${deployment.logPath}";`,
|
||||
);
|
||||
await updateDeploymentStatus(deployment.deploymentId, "error");
|
||||
await updateCompose(composeId, {
|
||||
@ -443,7 +443,7 @@ export const rebuildRemoteCompose = async ({
|
||||
|
||||
export const removeCompose = async (
|
||||
compose: Compose,
|
||||
deleteVolumes: boolean
|
||||
deleteVolumes: boolean,
|
||||
) => {
|
||||
try {
|
||||
const { COMPOSE_PATH } = paths(!!compose.serverId);
|
||||
@ -496,8 +496,8 @@ export const startCompose = async (composeId: string) => {
|
||||
`cd ${join(
|
||||
COMPOSE_PATH,
|
||||
compose.appName,
|
||||
"code"
|
||||
)} && docker compose -p ${compose.appName} up -d`
|
||||
"code",
|
||||
)} && docker compose -p ${compose.appName} up -d`,
|
||||
);
|
||||
} else {
|
||||
await execAsync(`docker compose -p ${compose.appName} up -d`, {
|
||||
@ -529,7 +529,7 @@ export const stopCompose = async (composeId: string) => {
|
||||
compose.serverId,
|
||||
`cd ${join(COMPOSE_PATH, compose.appName)} && docker compose -p ${
|
||||
compose.appName
|
||||
} stop`
|
||||
} stop`,
|
||||
);
|
||||
} else {
|
||||
await execAsync(`docker compose -p ${compose.appName} stop`, {
|
||||
|
Loading…
Reference in New Issue
Block a user