mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02: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", [
|
||||
z.object({
|
||||
buildType: z.literal(BuildType.dockerfile),
|
||||
dockerfile: z
|
||||
.string({
|
||||
required_error: "Dockerfile path is required",
|
||||
invalid_type_error: "Dockerfile path is required",
|
||||
})
|
||||
.min(1, "Dockerfile required"),
|
||||
dockerfile: z.string().nullable().default(""),
|
||||
dockerContextPath: z.string().nullable().default(""),
|
||||
dockerBuildStage: z.string().nullable().default(""),
|
||||
}),
|
||||
@@ -347,9 +342,10 @@ export const ShowBuildChooseForm = ({ applicationId }: Props) => {
|
||||
<FormLabel>Docker File</FormLabel>
|
||||
<FormControl>
|
||||
<Input
|
||||
placeholder="Path of your docker file"
|
||||
placeholder="Path of your docker file (default: Dockerfile)"
|
||||
{...field}
|
||||
value={field.value ?? ""}
|
||||
defaultValue={"Dockerfile"}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
|
||||
@@ -127,7 +127,7 @@ export const getBuildAppDirectory = (application: Application) => {
|
||||
appName,
|
||||
"code",
|
||||
buildPath ?? "",
|
||||
dockerfile || "",
|
||||
dockerfile || "Dockerfile",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user