mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-02-25 20:35:10 +00:00
Merge pull request #3760 from jirkavrba/feat/optional-dockerfile-path
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,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 ?? ""}
|
||||
/>
|
||||
|
||||
1
apps/dokploy/drizzle/0146_bumpy_morg.sql
Normal file
1
apps/dokploy/drizzle/0146_bumpy_morg.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE "application" ALTER COLUMN "dockerfile" SET DEFAULT 'Dockerfile';
|
||||
7460
apps/dokploy/drizzle/meta/0146_snapshot.json
Normal file
7460
apps/dokploy/drizzle/meta/0146_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1023,6 +1023,13 @@
|
||||
"when": 1771447229358,
|
||||
"tag": "0145_remarkable_titania",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 146,
|
||||
"version": "7",
|
||||
"when": 1771670009325,
|
||||
"tag": "0146_bumpy_morg",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -127,7 +127,7 @@ export const getBuildAppDirectory = (application: Application) => {
|
||||
appName,
|
||||
"code",
|
||||
buildPath ?? "",
|
||||
dockerfile || "",
|
||||
dockerfile || "Dockerfile",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user