mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-16 08:55:18 +00:00
feat: Make dockerfile path optional and default to "Dockerfile"
This commit is contained in:
@@ -74,12 +74,7 @@ const buildTypeDisplayMap: Record<BuildType, string> = {
|
|||||||
const mySchema = z.discriminatedUnion("buildType", [
|
const mySchema = z.discriminatedUnion("buildType", [
|
||||||
z.object({
|
z.object({
|
||||||
buildType: z.literal(BuildType.dockerfile),
|
buildType: z.literal(BuildType.dockerfile),
|
||||||
dockerfile: z
|
dockerfile: z.string().nullable().default(""),
|
||||||
.string({
|
|
||||||
required_error: "Dockerfile path is required",
|
|
||||||
invalid_type_error: "Dockerfile path is required",
|
|
||||||
})
|
|
||||||
.min(1, "Dockerfile required"),
|
|
||||||
dockerContextPath: z.string().nullable().default(""),
|
dockerContextPath: z.string().nullable().default(""),
|
||||||
dockerBuildStage: z.string().nullable().default(""),
|
dockerBuildStage: z.string().nullable().default(""),
|
||||||
}),
|
}),
|
||||||
@@ -347,9 +342,10 @@ export const ShowBuildChooseForm = ({ applicationId }: Props) => {
|
|||||||
<FormLabel>Docker File</FormLabel>
|
<FormLabel>Docker File</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder="Path of your docker file"
|
placeholder="Path of your docker file (default: Dockerfile)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
|
defaultValue={"Dockerfile"}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ export const getBuildAppDirectory = (application: Application) => {
|
|||||||
appName,
|
appName,
|
||||||
"code",
|
"code",
|
||||||
buildPath ?? "",
|
buildPath ?? "",
|
||||||
dockerfile || "",
|
dockerfile || "Dockerfile",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user