Merge pull request #3760 from jirkavrba/feat/optional-dockerfile-path

feat: Make dockerfile path optional and default to "Dockerfile"
This commit is contained in:
Mauricio Siu
2026-02-22 01:48:17 -06:00
committed by GitHub
6 changed files with 7472 additions and 9 deletions

View File

@@ -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,7 +342,7 @@ 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 ?? ""}
/>

View File

@@ -0,0 +1 @@
ALTER TABLE "application" ALTER COLUMN "dockerfile" SET DEFAULT 'Dockerfile';

File diff suppressed because it is too large Load Diff

View File

@@ -1023,6 +1023,13 @@
"when": 1771447229358,
"tag": "0145_remarkable_titania",
"breakpoints": true
},
{
"idx": 146,
"version": "7",
"when": 1771670009325,
"tag": "0146_bumpy_morg",
"breakpoints": true
}
]
}

View File

@@ -159,7 +159,7 @@ export const applications = pgTable("application", {
},
),
enableSubmodules: boolean("enableSubmodules").notNull().default(false),
dockerfile: text("dockerfile"),
dockerfile: text("dockerfile").default("Dockerfile"),
dockerContextPath: text("dockerContextPath"),
dockerBuildStage: text("dockerBuildStage"),
// Drop

View File

@@ -127,7 +127,7 @@ export const getBuildAppDirectory = (application: Application) => {
appName,
"code",
buildPath ?? "",
dockerfile || "",
dockerfile || "Dockerfile",
);
}