diff --git a/components/dashboard/application/advanced/volumes/add-volumes.tsx b/components/dashboard/application/advanced/volumes/add-volumes.tsx index 6b882b7c..a7a39b83 100644 --- a/components/dashboard/application/advanced/volumes/add-volumes.tsx +++ b/components/dashboard/application/advanced/volumes/add-volumes.tsx @@ -63,6 +63,7 @@ const mySchema = z.discriminatedUnion("type", [ z .object({ type: z.literal("file"), + filePath: z.string().min(1, "File path required"), content: z.string().optional(), }) .merge(mountSchema), @@ -81,7 +82,7 @@ export const AddVolumes = ({ defaultValues: { type: serviceType === "compose" ? "file" : "bind", hostPath: "", - mountPath: "", + mountPath: serviceType === "compose" ? "/" : "", }, resolver: zodResolver(mySchema), }); @@ -125,6 +126,7 @@ export const AddVolumes = ({ serviceId, content: data.content, mountPath: data.mountPath, + filePath: data.filePath, type: data.type, serviceType, }) @@ -288,41 +290,62 @@ export const AddVolumes = ({ )} {type === "file" && ( + <> + ( + + Content + + +