Merge branch 'canary' into 379-preview-deployment

This commit is contained in:
Mauricio Siu
2024-12-07 21:28:34 -06:00
parent 841b264257
commit 5058d9b47d
57 changed files with 933 additions and 754 deletions

View File

@@ -296,6 +296,7 @@ export const applicationRouter = createTRPCRouter({
publishDirectory: input.publishDirectory,
dockerContextPath: input.dockerContextPath,
dockerBuildStage: input.dockerBuildStage,
herokuVersion: input.herokuVersion,
});
return true;

View File

@@ -48,6 +48,7 @@ import {
removeCompose,
removeComposeDirectory,
removeDeploymentsByComposeId,
startCompose,
stopCompose,
updateCompose,
} from "@dokploy/server";
@@ -309,6 +310,20 @@ export const composeRouter = createTRPCRouter({
}
await stopCompose(input.composeId);
return true;
}),
start: protectedProcedure
.input(apiFindCompose)
.mutation(async ({ input, ctx }) => {
const compose = await findComposeById(input.composeId);
if (compose.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
message: "You are not authorized to stop this compose",
});
}
await startCompose(input.composeId);
return true;
}),
getDefaultCommand: protectedProcedure

View File

@@ -188,8 +188,9 @@ export const notificationRouter = createTRPCRouter({
.mutation(async ({ input }) => {
try {
await sendDiscordNotification(input, {
title: "Test Notification",
description: "Hi, From Dokploy 👋",
title: "> `🤚` - Test Notification",
description: "> Hi, From Dokploy 👋",
color: 0xf3f7f4,
});
return true;
} catch (error) {