MCPcopy
hub / github.com/Dokploy/dokploy / deploy

Function deploy

apps/dokploy/server/utils/deploy.ts:4–25  ·  view source on GitHub ↗
(jobData: DeploymentJob)

Source from the content-addressed store, hash-verified

2import type { DeploymentJob } from "../queues/queue-types";
3
4export const deploy = async (jobData: DeploymentJob) => {
5 try {
6 const server = await findServerById(jobData.serverId as string);
7 if (server.serverStatus === "inactive") {
8 throw new Error("Server is inactive");
9 }
10
11 const result = await fetch(`${process.env.SERVER_URL}/deploy`, {
12 method: "POST",
13 headers: {
14 "Content-Type": "application/json",
15 "X-API-Key": process.env.API_KEY || "NO-DEFINED",
16 },
17 body: JSON.stringify(jobData),
18 });
19
20 const data = await result.json();
21 return data;
22 } catch (error) {
23 throw error;
24 }
25};
26
27type CancelDeploymentData =
28 | { applicationId: string; applicationType: "application" }

Callers 8

handlerFunction · 0.90
handlerFunction · 0.90
handlerFunction · 0.90
compose.tsFile · 0.90
application.tsFile · 0.90
ShowGeneralApplicationFunction · 0.50
ComposeActionsFunction · 0.50

Calls 1

findServerByIdFunction · 0.90

Tested by

no test coverage detected