diff --git a/apps/dokploy/__test__/traefik/traefik.test.ts b/apps/dokploy/__test__/traefik/traefik.test.ts index 80a10826..dc7bc3de 100644 --- a/apps/dokploy/__test__/traefik/traefik.test.ts +++ b/apps/dokploy/__test__/traefik/traefik.test.ts @@ -40,6 +40,7 @@ const baseApp: ApplicationNested = { placementSwarm: null, ports: [], projectId: "", + publishDirectory: null, redirects: [], refreshToken: "", registry: null, diff --git a/apps/dokploy/components/dashboard/application/build/show.tsx b/apps/dokploy/components/dashboard/application/build/show.tsx index aab78871..db28cb2f 100644 --- a/apps/dokploy/components/dashboard/application/build/show.tsx +++ b/apps/dokploy/components/dashboard/application/build/show.tsx @@ -3,6 +3,7 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Form, FormControl, + FormDescription, FormField, FormItem, FormLabel, @@ -43,6 +44,7 @@ const mySchema = z.discriminatedUnion("buildType", [ }), z.object({ buildType: z.literal("nixpacks"), + publishDirectory: z.string().optional(), }), ]); @@ -84,6 +86,7 @@ export const ShowBuildChooseForm = ({ applicationId }: Props) => { } else { form.reset({ buildType: data.buildType, + publishDirectory: data.publishDirectory || undefined, }); } } @@ -93,6 +96,8 @@ export const ShowBuildChooseForm = ({ applicationId }: Props) => { await mutateAsync({ applicationId, buildType: data.buildType, + publishDirectory: + data.buildType === "nixpacks" ? data.publishDirectory : null, dockerfile: data.buildType === "dockerfile" ? data.dockerfile : null, }) .then(async () => { @@ -200,6 +205,36 @@ export const ShowBuildChooseForm = ({ applicationId }: Props) => { }} /> )} + + {buildType === "nixpacks" && ( + { + return ( + +
+ Publish Directory + + Allows you to serve a single directory via NGINX after + the build phase. Useful if the final build assets + should be served as a static site. + +
+ + + + + +
+ ); + }} + /> + )}