From ac26bb95e38c836b495315c3246125d14915f5e0 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Fri, 2 Aug 2024 13:40:25 -0600 Subject: [PATCH] fix(template): add missing file path --- .../advanced/volumes/add-volumes.tsx | 30 +++++++++---------- apps/dokploy/server/api/routers/compose.ts | 1 + apps/dokploy/templates/utils/index.ts | 1 + 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx b/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx index e32ad756..3e219295 100644 --- a/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx +++ b/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx @@ -82,7 +82,7 @@ export const AddVolumes = ({ defaultValues: { type: serviceType === "compose" ? "file" : "bind", hostPath: "", - mountPath: serviceType === "compose" ? "/" : "", + mountPath: "", }, resolver: zodResolver(mySchema), }); @@ -330,22 +330,20 @@ export const AddVolumes = ({ /> )} - {serviceType !== "compose" && ( - ( - - Mount Path (In the container) - - - + ( + + Mount Path (In the container) + + + - - - )} - /> - )} + + + )} + /> diff --git a/apps/dokploy/server/api/routers/compose.ts b/apps/dokploy/server/api/routers/compose.ts index f97fac37..f1bbeb2a 100644 --- a/apps/dokploy/server/api/routers/compose.ts +++ b/apps/dokploy/server/api/routers/compose.ts @@ -227,6 +227,7 @@ export const composeRouter = createTRPCRouter({ if (mounts && mounts?.length > 0) { for (const mount of mounts) { await createMount({ + filePath: mount.filePath, mountPath: mount.mountPath, content: mount.content, serviceId: compose.composeId, diff --git a/apps/dokploy/templates/utils/index.ts b/apps/dokploy/templates/utils/index.ts index 03ab71a4..fe87e1a8 100644 --- a/apps/dokploy/templates/utils/index.ts +++ b/apps/dokploy/templates/utils/index.ts @@ -13,6 +13,7 @@ export interface Schema { export interface Template { envs: string[]; mounts?: { + filePath: string; mountPath: string; content?: string; }[];