From 4bbb2ece498df50de9db541c364712ce0301ccf0 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sun, 29 Mar 2026 08:39:27 -0600 Subject: [PATCH] feat(destinations): add additionalFlags field for destination settings - Introduced an optional `additionalFlags` field in the destination schema to allow users to specify extra parameters. - Updated the form in the dashboard to include a textarea for entering additional flags. - Modified the API router to handle the new `additionalFlags` input when creating or updating destinations. - Adjusted database schema to accommodate the new field in the destination table. --- .../destination/handle-destinations.tsx | 33 + apps/dokploy/drizzle/0155_careless_clea.sql | 1 + apps/dokploy/drizzle/meta/0155_snapshot.json | 8243 +++++++++++++++++ apps/dokploy/drizzle/meta/_journal.json | 7 + .../dokploy/server/api/routers/destination.ts | 14 +- packages/server/src/db/schema/destination.ts | 4 + packages/server/src/utils/backups/utils.ts | 4 + 7 files changed, 8304 insertions(+), 2 deletions(-) create mode 100644 apps/dokploy/drizzle/0155_careless_clea.sql create mode 100644 apps/dokploy/drizzle/meta/0155_snapshot.json diff --git a/apps/dokploy/components/dashboard/settings/destination/handle-destinations.tsx b/apps/dokploy/components/dashboard/settings/destination/handle-destinations.tsx index 966c8e5f5..aa940b948 100644 --- a/apps/dokploy/components/dashboard/settings/destination/handle-destinations.tsx +++ b/apps/dokploy/components/dashboard/settings/destination/handle-destinations.tsx @@ -24,6 +24,7 @@ import { FormMessage, } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; +import { Textarea } from "@/components/ui/textarea"; import { Select, SelectContent, @@ -46,6 +47,7 @@ const addDestination = z.object({ region: z.string(), endpoint: z.string().min(1, "Endpoint is required"), serverId: z.string().optional(), + additionalFlags: z.array(z.string()).optional(), }); type AddDestination = z.infer; @@ -89,6 +91,7 @@ export const HandleDestinations = ({ destinationId }: Props) => { region: "", secretAccessKey: "", endpoint: "", + additionalFlags: [], }, resolver: zodResolver(addDestination), }); @@ -102,6 +105,7 @@ export const HandleDestinations = ({ destinationId }: Props) => { bucket: destination.bucket, region: destination.region, endpoint: destination.endpoint, + additionalFlags: destination.additionalFlags ?? [], }); } else { form.reset(); @@ -118,6 +122,7 @@ export const HandleDestinations = ({ destinationId }: Props) => { region: data.region, secretAccessKey: data.secretAccessKey, destinationId: destinationId || "", + additionalFlags: data.additionalFlags ?? [], }) .then(async () => { toast.success(`Destination ${destinationId ? "Updated" : "Created"}`); @@ -179,6 +184,7 @@ export const HandleDestinations = ({ destinationId }: Props) => { region, secretAccessKey: secretKey, serverId, + additionalFlags: form.getValues("additionalFlags") ?? [], }) .then(() => { toast.success("Connection Success"); @@ -358,6 +364,33 @@ export const HandleDestinations = ({ destinationId }: Props) => { )} /> + ( + + Additional Flags (Optional) + +