mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-01 09:42:16 +00:00
Merge branch 'canary' into unify-deployment-logic
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
|||||||
findNotificationById,
|
findNotificationById,
|
||||||
findOrganizationById,
|
findOrganizationById,
|
||||||
findUserById,
|
findUserById,
|
||||||
|
getDokployUrl,
|
||||||
getUserByToken,
|
getUserByToken,
|
||||||
IS_CLOUD,
|
IS_CLOUD,
|
||||||
removeUserById,
|
removeUserById,
|
||||||
@@ -419,11 +420,10 @@ export const userRouter = createTRPCRouter({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const admin = await findAdmin();
|
|
||||||
const host =
|
const host =
|
||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === "development"
|
||||||
? "http://localhost:3000"
|
? "http://localhost:3000"
|
||||||
: admin.user.host;
|
: await getDokployUrl();
|
||||||
const inviteLink = `${host}/invitation?token=${input.invitationId}`;
|
const inviteLink = `${host}/invitation?token=${input.invitationId}`;
|
||||||
|
|
||||||
const organization = await findOrganizationById(
|
const organization = await findOrganizationById(
|
||||||
|
|||||||
@@ -34,12 +34,6 @@ export const deployments = pgTable("deployment", {
|
|||||||
status: deploymentStatus("status").default("running"),
|
status: deploymentStatus("status").default("running"),
|
||||||
logPath: text("logPath").notNull(),
|
logPath: text("logPath").notNull(),
|
||||||
pid: text("pid"),
|
pid: text("pid"),
|
||||||
applicationBuildServerId: text("applicationBuildServerId").references(
|
|
||||||
() => server.serverId,
|
|
||||||
{
|
|
||||||
onDelete: "cascade",
|
|
||||||
},
|
|
||||||
),
|
|
||||||
applicationId: text("applicationId").references(
|
applicationId: text("applicationId").references(
|
||||||
() => applications.applicationId,
|
() => applications.applicationId,
|
||||||
{ onDelete: "cascade" },
|
{ onDelete: "cascade" },
|
||||||
|
|||||||
@@ -110,7 +110,8 @@ export const getDokployUrl = async () => {
|
|||||||
const admin = await findAdmin();
|
const admin = await findAdmin();
|
||||||
|
|
||||||
if (admin.user.host) {
|
if (admin.user.host) {
|
||||||
return `https://${admin.user.host}`;
|
const protocol = admin.user.https ? "https" : "http";
|
||||||
|
return `${protocol}://${admin.user.host}`;
|
||||||
}
|
}
|
||||||
return `http://${admin.user.serverIp}:${process.env.PORT}`;
|
return `http://${admin.user.serverIp}:${process.env.PORT}`;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -112,7 +112,6 @@ export const createDeployment = async (
|
|||||||
logPath: logFilePath,
|
logPath: logFilePath,
|
||||||
description: deployment.description || "",
|
description: deployment.description || "",
|
||||||
startedAt: new Date().toISOString(),
|
startedAt: new Date().toISOString(),
|
||||||
// applicationBuildServerId: application.serverBuildId,
|
|
||||||
})
|
})
|
||||||
.returning();
|
.returning();
|
||||||
if (deploymentCreate.length === 0 || !deploymentCreate[0]) {
|
if (deploymentCreate.length === 0 || !deploymentCreate[0]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user