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; }[];