Skip to content

Commit 5435e1d

Browse files
authored
Merge pull request #3760 from jirkavrba/feat/optional-dockerfile-path
feat: Make dockerfile path optional and default to "Dockerfile"
2 parents 3e461f6 + 999e5fa commit 5435e1d

6 files changed

Lines changed: 7472 additions & 9 deletions

File tree

apps/dokploy/components/dashboard/application/build/show.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,7 @@ const buildTypeDisplayMap: Record<BuildType, string> = {
7474
const mySchema = z.discriminatedUnion("buildType", [
7575
z.object({
7676
buildType: z.literal(BuildType.dockerfile),
77-
dockerfile: z
78-
.string({
79-
required_error: "Dockerfile path is required",
80-
invalid_type_error: "Dockerfile path is required",
81-
})
82-
.min(1, "Dockerfile required"),
77+
dockerfile: z.string().nullable().default(""),
8378
dockerContextPath: z.string().nullable().default(""),
8479
dockerBuildStage: z.string().nullable().default(""),
8580
}),
@@ -347,7 +342,7 @@ export const ShowBuildChooseForm = ({ applicationId }: Props) => {
347342
<FormLabel>Docker File</FormLabel>
348343
<FormControl>
349344
<Input
350-
placeholder="Path of your docker file"
345+
placeholder="Path of your docker file (default: Dockerfile)"
351346
{...field}
352347
value={field.value ?? ""}
353348
/>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "application" ALTER COLUMN "dockerfile" SET DEFAULT 'Dockerfile';

0 commit comments

Comments
 (0)