From b2cf442d9b3de99305c92d98fb6e1ff562480f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ordon?= <87477+designorant@users.noreply.github.com> Date: Mon, 30 Dec 2024 01:47:34 +0000 Subject: [PATCH 01/21] feat(i18n): add missing keys to Polish translation --- apps/dokploy/public/locales/pl/settings.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/dokploy/public/locales/pl/settings.json b/apps/dokploy/public/locales/pl/settings.json index 934148251..a87b82cba 100644 --- a/apps/dokploy/public/locales/pl/settings.json +++ b/apps/dokploy/public/locales/pl/settings.json @@ -19,6 +19,14 @@ "settings.server.webServer.server.label": "Serwer", "settings.server.webServer.traefik.label": "Traefik", "settings.server.webServer.traefik.modifyEnv": "Zmodyfikuj środowisko", + "settings.server.webServer.traefik.managePorts": "Dodatkowe mapowania portów", + "settings.server.webServer.traefik.managePortsDescription": "Dodaj lub usuń dodatkowe porty dla Traefik", + "settings.server.webServer.traefik.targetPort": "Port docelowy", + "settings.server.webServer.traefik.publishedPort": "Port opublikowany", + "settings.server.webServer.traefik.addPort": "Dodaj port", + "settings.server.webServer.traefik.portsUpdated": "Porty zaktualizowane pomyślnie", + "settings.server.webServer.traefik.portsUpdateError": "Nie udało się zaktualizować portów", + "settings.server.webServer.traefik.publishMode": "Tryb publikacji", "settings.server.webServer.storage.label": "Przestrzeń", "settings.server.webServer.storage.cleanUnusedImages": "Wyczyść nieużywane obrazy", "settings.server.webServer.storage.cleanUnusedVolumes": "Wyczyść nieużywane wolumeny", From 9122a1e4b2f4de5ad877f6772d1d4385fead37da Mon Sep 17 00:00:00 2001 From: vishalkadam47 Date: Mon, 30 Dec 2024 07:32:34 +0530 Subject: [PATCH 02/21] refactor: enhance ManageTraefikPorts with ScrollArea for better UI and port management display --- .../web-server/manage-traefik-ports.tsx | 214 +++++++++--------- 1 file changed, 112 insertions(+), 102 deletions(-) diff --git a/apps/dokploy/components/dashboard/settings/web-server/manage-traefik-ports.tsx b/apps/dokploy/components/dashboard/settings/web-server/manage-traefik-ports.tsx index 6c784b520..a30823363 100644 --- a/apps/dokploy/components/dashboard/settings/web-server/manage-traefik-ports.tsx +++ b/apps/dokploy/components/dashboard/settings/web-server/manage-traefik-ports.tsx @@ -18,6 +18,7 @@ import { FormMessage, } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; +import { ScrollArea } from "@/components/ui/scroll-area"; import { Select, SelectContent, @@ -114,7 +115,15 @@ export const ManageTraefikPorts = ({ children, serverId }: Props) => {
- {t("settings.server.webServer.traefik.managePortsDescription")} +
+ {t( + "settings.server.webServer.traefik.managePortsDescription", + )} + + {fields.length} port mapping{fields.length !== 1 ? "s" : ""}{" "} + configured + +
) : ( -
- {fields.map((field, index) => ( - - - ( - - - {t( - "settings.server.webServer.traefik.targetPort", - )} - - - - field.onChange(Number(e.target.value)) - } - className="w-full dark:bg-black" - placeholder="e.g. 8080" - /> - - - - )} - /> - - ( - - - {t( - "settings.server.webServer.traefik.publishedPort", - )} - - - - field.onChange(Number(e.target.value)) - } - className="w-full dark:bg-black" - placeholder="e.g. 80" - /> - - - - )} - /> - - ( - - - {t( - "settings.server.webServer.traefik.publishMode", - )} - - + field.onChange(Number(e.target.value)) + } + className="w-full dark:bg-black" + placeholder="e.g. 8080" + /> - - - Host Mode - - - Ingress Mode - - - - - - )} - /> + + + )} + /> -
- -
-
-
- ))} -
+ ( + + + {t( + "settings.server.webServer.traefik.publishedPort", + )} + + + + field.onChange(Number(e.target.value)) + } + className="w-full dark:bg-black" + placeholder="e.g. 80" + /> + + + + )} + /> + + ( + + + {t( + "settings.server.webServer.traefik.publishMode", + )} + + + + + )} + /> + +
+ +
+ + + ))} + + )} {fields.length > 0 && ( @@ -281,7 +292,6 @@ export const ManageTraefikPorts = ({ children, serverId }: Props) => { )} - @@ -87,12 +97,13 @@ export default function SwarmMonitorCard({ serverId }: Props) { - - Active Nodes - - Online - - +
+ + Active Nodes + + Online + +
@@ -121,12 +132,13 @@ export default function SwarmMonitorCard({ serverId }: Props) { - - Manager Nodes - - Online - - +
+ + Manager Nodes + + Online + +
@@ -162,4 +174,4 @@ export default function SwarmMonitorCard({ serverId }: Props) { ); -} \ No newline at end of file +} From ed5936ede7c7dae12d742c18ff9bce57198613d7 Mon Sep 17 00:00:00 2001 From: UndefinedPony Date: Tue, 31 Dec 2024 11:11:33 +0100 Subject: [PATCH 08/21] feat: add health endpoint for frontend app --- apps/dokploy/pages/api/health.ts | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 apps/dokploy/pages/api/health.ts diff --git a/apps/dokploy/pages/api/health.ts b/apps/dokploy/pages/api/health.ts new file mode 100644 index 000000000..9dc8101e5 --- /dev/null +++ b/apps/dokploy/pages/api/health.ts @@ -0,0 +1,8 @@ +import type { NextApiRequest, NextApiResponse } from "next"; + +export default async function handler( + req: NextApiRequest, + res: NextApiResponse, +) { + return res.status(200).json({ ok: true }); +} From 29a8cb63c056155bc1d04a233cd3b6a4ec8b4963 Mon Sep 17 00:00:00 2001 From: UndefinedPony Date: Tue, 31 Dec 2024 11:13:58 +0100 Subject: [PATCH 09/21] refactor: pass update data and use updates modal in navbar --- apps/dokploy/components/layouts/navbar.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/dokploy/components/layouts/navbar.tsx b/apps/dokploy/components/layouts/navbar.tsx index 0e52d7019..bf733bd23 100644 --- a/apps/dokploy/components/layouts/navbar.tsx +++ b/apps/dokploy/components/layouts/navbar.tsx @@ -13,15 +13,19 @@ import { HeartIcon } from "lucide-react"; import Link from "next/link"; import { useRouter } from "next/router"; import { useEffect, useRef, useState } from "react"; -import { UpdateWebServer } from "../dashboard/settings/web-server/update-webserver"; import { Logo } from "../shared/logo"; import { Avatar, AvatarFallback, AvatarImage } from "../ui/avatar"; import { buttonVariants } from "../ui/button"; +import UpdateServer from "../dashboard/settings/web-server/update-server"; +import type { IUpdateData } from "@dokploy/server/index"; const AUTO_CHECK_UPDATES_INTERVAL_MINUTES = 7; export const Navbar = () => { - const [isUpdateAvailable, setIsUpdateAvailable] = useState(false); + const [updateData, setUpdateData] = useState({ + latestVersion: null, + updateAvailable: false, + }); const router = useRouter(); const { data } = api.auth.get.useQuery(); const { data: isCloud } = api.settings.isCloud.useQuery(); @@ -62,12 +66,12 @@ export const Navbar = () => { return; } - const { updateAvailable } = await getUpdateData(); + const fetchedUpdateData = await getUpdateData(); - if (updateAvailable) { + if (fetchedUpdateData?.updateAvailable) { // Stop interval when update is available clearUpdatesInterval(); - setIsUpdateAvailable(true); + setUpdateData(fetchedUpdateData); } } catch (error) { console.error("Error auto-checking for updates:", error); @@ -101,9 +105,9 @@ export const Navbar = () => { - {isUpdateAvailable && ( + {updateData.updateAvailable && (
- +
)} Date: Tue, 31 Dec 2024 11:19:22 +0100 Subject: [PATCH 10/21] refactor: allow using already fetched updateData, remove ping icon --- .../settings/web-server/update-server.tsx | 42 ++++++++++++++----- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/apps/dokploy/components/dashboard/settings/web-server/update-server.tsx b/apps/dokploy/components/dashboard/settings/web-server/update-server.tsx index 6c8475d30..dad04ab03 100644 --- a/apps/dokploy/components/dashboard/settings/web-server/update-server.tsx +++ b/apps/dokploy/components/dashboard/settings/web-server/update-server.tsx @@ -22,16 +22,25 @@ import { useState } from "react"; import { toast } from "sonner"; import { ToggleAutoCheckUpdates } from "./toggle-auto-check-updates"; import { UpdateWebServer } from "./update-webserver"; +import type { IUpdateData } from "@dokploy/server/index"; -export const UpdateServer = () => { - const [hasCheckedUpdate, setHasCheckedUpdate] = useState(false); - const [isUpdateAvailable, setIsUpdateAvailable] = useState(false); +interface Props { + updateData?: IUpdateData; +} + +export const UpdateServer = ({ updateData }: Props) => { + const [hasCheckedUpdate, setHasCheckedUpdate] = useState(!!updateData); + const [isUpdateAvailable, setIsUpdateAvailable] = useState( + !!updateData?.updateAvailable, + ); const { mutateAsync: getUpdateData, isLoading } = api.settings.getUpdateData.useMutation(); const { data: dokployVersion } = api.settings.getDokployVersion.useQuery(); const { data: releaseTag } = api.settings.getReleaseTag.useQuery(); const [isOpen, setIsOpen] = useState(false); - const [latestVersion, setLatestVersion] = useState(""); + const [latestVersion, setLatestVersion] = useState( + updateData?.latestVersion ?? "", + ); const handleCheckUpdates = async () => { try { @@ -61,9 +70,24 @@ export const UpdateServer = () => { return ( - @@ -99,10 +123,6 @@ export const UpdateServer = () => {
- - - - New version available: From 187f051484ab3c51d6d19647713e49aa7e267adf Mon Sep 17 00:00:00 2001 From: UndefinedPony Date: Tue, 31 Dec 2024 11:20:59 +0100 Subject: [PATCH 11/21] fix: check health endpoint instead of awaiting service restart to fix update success status --- .../settings/web-server/update-webserver.tsx | 97 +++++++++++++------ apps/dokploy/server/api/routers/settings.ts | 4 +- 2 files changed, 71 insertions(+), 30 deletions(-) diff --git a/apps/dokploy/components/dashboard/settings/web-server/update-webserver.tsx b/apps/dokploy/components/dashboard/settings/web-server/update-webserver.tsx index c1e5de706..537a1adde 100644 --- a/apps/dokploy/components/dashboard/settings/web-server/update-webserver.tsx +++ b/apps/dokploy/components/dashboard/settings/web-server/update-webserver.tsx @@ -11,30 +11,50 @@ import { } from "@/components/ui/alert-dialog"; import { Button } from "@/components/ui/button"; import { api } from "@/utils/api"; -import { HardDriveDownload } from "lucide-react"; +import { HardDriveDownload, Loader2 } from "lucide-react"; +import { useState } from "react"; import { toast } from "sonner"; -interface Props { - isNavbar?: boolean; -} +export const UpdateWebServer = () => { + const [updating, setUpdating] = useState(false); + const [open, setOpen] = useState(false); -export const UpdateWebServer = ({ isNavbar }: Props) => { - const { mutateAsync: updateServer, isLoading } = - api.settings.updateServer.useMutation(); + const { mutateAsync: updateServer } = api.settings.updateServer.useMutation(); - const buttonLabel = isNavbar ? "Update available" : "Update Server"; - - const handleConfirm = async () => { + const checkIsUpdateFinished = async () => { try { - await updateServer(); + const response = await fetch("/api/health"); + if (!response.ok) { + throw new Error("Health check failed"); + } + toast.success( "The server has been updated. The page will be reloaded to reflect the changes...", ); + setTimeout(() => { // Allow seeing the toast before reloading window.location.reload(); }, 2000); + } catch { + // Delay each request + await new Promise((resolve) => setTimeout(resolve, 2000)); + // Keep running until it returns 200 + void checkIsUpdateFinished(); + } + }; + + const handleConfirm = async () => { + try { + setUpdating(true); + await updateServer(); + + // Give some time for docker service restart before starting to check status + await new Promise((resolve) => setTimeout(resolve, 8000)); + + await checkIsUpdateFinished(); } catch (error) { + setUpdating(false); console.error("Error updating server:", error); toast.error( "An error occurred while updating the server, please try again.", @@ -43,35 +63,54 @@ export const UpdateWebServer = ({ isNavbar }: Props) => { }; return ( - + - Are you absolutely sure? + + {updating + ? "Server update in progress" + : "Are you absolutely sure?"} + - This action cannot be undone. This will update the web server to the - new version. The page will be reloaded once the update is finished. + {updating ? ( + + + The server is being updated, please wait... + + ) : ( + <> + This action cannot be undone. This will update the web server to + the new version. You will not be able to use the panel during + the update process. The page will be reloaded once the update is + finished. + + )} - - Cancel - Confirm - + {!updating && ( + + setOpen(false)}> + Cancel + + + Confirm + + + )} ); diff --git a/apps/dokploy/server/api/routers/settings.ts b/apps/dokploy/server/api/routers/settings.ts index b40ee95bd..449a22333 100644 --- a/apps/dokploy/server/api/routers/settings.ts +++ b/apps/dokploy/server/api/routers/settings.ts @@ -359,7 +359,9 @@ export const settingsRouter = createTRPCRouter({ await pullLatestRelease(); - await spawnAsync("docker", [ + // This causes restart of dokploy, thus it will not finish executing properly, so don't await it + // Status after restart is checked via frontend /api/health endpoint + void spawnAsync("docker", [ "service", "update", "--force", From 513b17105e93f60db604eb9a4955bf5bac444ea9 Mon Sep 17 00:00:00 2001 From: Pierre B Date: Wed, 1 Jan 2025 15:47:47 +0100 Subject: [PATCH 12/21] style: environment style improvement --- .../application/environment/show.tsx | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/environment/show.tsx b/apps/dokploy/components/dashboard/application/environment/show.tsx index ec5558043..970464524 100644 --- a/apps/dokploy/components/dashboard/application/environment/show.tsx +++ b/apps/dokploy/components/dashboard/application/environment/show.tsx @@ -55,13 +55,13 @@ export const ShowEnvironment = ({ applicationId }: Props) => { }); }; - return ( -
- - + return ( + + + { placeholder="NPM_TOKEN=xyz" /> )} - -
- -
-
-
- - - ); +
+ +
+ + +
+ ); }; From 76787b9056a6b3d2e54876e058d4b3ee2190111d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ordon?= Date: Wed, 1 Jan 2025 17:11:08 +0000 Subject: [PATCH 13/21] style: enhance favicon with dark mode support --- apps/dokploy/public/icon.svg | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/dokploy/public/icon.svg b/apps/dokploy/public/icon.svg index 3a8930d5e..6752c2064 100644 --- a/apps/dokploy/public/icon.svg +++ b/apps/dokploy/public/icon.svg @@ -1,5 +1,12 @@ - - - + + + + From 7cf5cb40329d97134005fa6bca3f8e82264a2d5d Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Wed, 1 Jan 2025 16:39:27 -0700 Subject: [PATCH 14/21] fix: added unzip to server setup The installation script for rclone requires unzip to be present in order to install. This adds this dep to the deps installed as it's not present on Debian. --- packages/server/src/setup/server-setup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/setup/server-setup.ts b/packages/server/src/setup/server-setup.ts index 4fa46c331..83a645204 100644 --- a/packages/server/src/setup/server-setup.ts +++ b/packages/server/src/setup/server-setup.ts @@ -360,7 +360,7 @@ const installUtilities = () => ` ;; ubuntu | debian | raspbian) DEBIAN_FRONTEND=noninteractive apt-get update -y >/dev/null - DEBIAN_FRONTEND=noninteractive apt-get install -y curl wget git jq openssl >/dev/null + DEBIAN_FRONTEND=noninteractive apt-get install -y unzip curl wget git jq openssl >/dev/null ;; centos | fedora | rhel | ol | rocky | almalinux | amzn) if [ "$OS_TYPE" = "amzn" ]; then From b93d26f9370ae3ba8a3ad1464d7b9ab61e490e72 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Wed, 1 Jan 2025 18:53:30 -0600 Subject: [PATCH 15/21] refactor: use shadcn ui classes --- apps/dokploy/components/auth/login-2fa.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/dokploy/components/auth/login-2fa.tsx b/apps/dokploy/components/auth/login-2fa.tsx index f3d001f85..836c3b46c 100644 --- a/apps/dokploy/components/auth/login-2fa.tsx +++ b/apps/dokploy/components/auth/login-2fa.tsx @@ -105,12 +105,12 @@ export const Login2FA = ({ authId }: Props) => { pattern={REGEXP_ONLY_DIGITS} > - - - - - - + + + + + +
From eec0a55212ca873a0d746e0a95b351cd59b526c2 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Wed, 1 Jan 2025 18:57:23 -0600 Subject: [PATCH 16/21] Update apps/dokploy/templates/checkmate/docker-compose.yml --- apps/dokploy/templates/checkmate/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dokploy/templates/checkmate/docker-compose.yml b/apps/dokploy/templates/checkmate/docker-compose.yml index d5b67b0fd..b01502b48 100644 --- a/apps/dokploy/templates/checkmate/docker-compose.yml +++ b/apps/dokploy/templates/checkmate/docker-compose.yml @@ -32,7 +32,7 @@ services: ports: - 6379 volumes: - - ./redis/data:/data + - ../files/redis/data:/data networks: - dokploy-network mongodb: From f2159a3439c78719db6c2365f41005730cf2f741 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Wed, 1 Jan 2025 18:57:27 -0600 Subject: [PATCH 17/21] Update apps/dokploy/templates/checkmate/docker-compose.yml --- apps/dokploy/templates/checkmate/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dokploy/templates/checkmate/docker-compose.yml b/apps/dokploy/templates/checkmate/docker-compose.yml index b01502b48..dc83a28f6 100644 --- a/apps/dokploy/templates/checkmate/docker-compose.yml +++ b/apps/dokploy/templates/checkmate/docker-compose.yml @@ -39,7 +39,7 @@ services: image: bluewaveuptime/uptime_database_mongo:latest restart: always volumes: - - ./mongo/data:/data/db + - ../files/mongo/data:/data/db command: ["mongod", "--quiet"] ports: - 27017 From b17369264cfa2cef011a4173ee0dbd1297cfdd87 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Wed, 1 Jan 2025 19:02:24 -0600 Subject: [PATCH 18/21] refactor: remove min-h-screen --- .../dashboard/swarm/monitoring-card.tsx | 308 +++++++++--------- 1 file changed, 153 insertions(+), 155 deletions(-) diff --git a/apps/dokploy/components/dashboard/swarm/monitoring-card.tsx b/apps/dokploy/components/dashboard/swarm/monitoring-card.tsx index 16d2532c2..0dd34852a 100644 --- a/apps/dokploy/components/dashboard/swarm/monitoring-card.tsx +++ b/apps/dokploy/components/dashboard/swarm/monitoring-card.tsx @@ -2,176 +2,174 @@ import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { - Tooltip, - TooltipContent, - TooltipProvider, - TooltipTrigger, + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, } from "@/components/ui/tooltip"; import { api } from "@/utils/api"; import { Activity, Loader2, Monitor, Settings, Server } from "lucide-react"; import { NodeCard } from "./details/details-card"; interface Props { - serverId?: string; + serverId?: string; } export default function SwarmMonitorCard({ serverId }: Props) { - const { data: nodes, isLoading } = api.swarm.getNodes.useQuery({ - serverId, - }); + const { data: nodes, isLoading } = api.swarm.getNodes.useQuery({ + serverId, + }); - if (isLoading) { - return ( -
-
-
- -
-
-
- ); - } + if (isLoading) { + return ( +
+
+
+ +
+
+
+ ); + } - if (!nodes) { - return ( -
-
-
- Failed to load data -
-
-
- ); - } + if (!nodes) { + return ( +
+
+
+ Failed to load data +
+
+
+ ); + } - const totalNodes = nodes.length; - const activeNodesCount = nodes.filter( - (node) => node.Status === "Ready" - ).length; - const managerNodesCount = nodes.filter( - (node) => - node.ManagerStatus === "Leader" || node.ManagerStatus === "Reachable" - ).length; - const activeNodes = nodes.filter((node) => node.Status === "Ready"); - const managerNodes = nodes.filter( - (node) => - node.ManagerStatus === "Leader" || node.ManagerStatus === "Reachable" - ); + const totalNodes = nodes.length; + const activeNodesCount = nodes.filter( + (node) => node.Status === "Ready", + ).length; + const managerNodesCount = nodes.filter( + (node) => + node.ManagerStatus === "Leader" || node.ManagerStatus === "Reachable", + ).length; + const activeNodes = nodes.filter((node) => node.Status === "Ready"); + const managerNodes = nodes.filter( + (node) => + node.ManagerStatus === "Leader" || node.ManagerStatus === "Reachable", + ); - return ( -
-
-
-
-

- Docker Swarm Overview -

-

- Monitor and manage your Docker Swarm cluster -

-
- {!serverId && ( - - )} -
+ return ( +
+
+
+
+

+ Docker Swarm Overview +

+

+ Monitor and manage your Docker Swarm cluster +

+
+ {!serverId && ( + + )} +
-
- - - Total Nodes -
- -
-
- -
{totalNodes}
-
-
+
+ + + Total Nodes +
+ +
+
+ +
{totalNodes}
+
+
- - -
- - Active Nodes - - Online + + +
+ + Active Nodes + + Online +
+
+ +
+
+ + + + +
+ {activeNodesCount} / {totalNodes} +
+
+ +
+ {activeNodes.map((node) => ( +
+ {node.Hostname} +
+ ))} +
+
+
+
+
+
-
-
- -
-
- - - - -
- {activeNodesCount} / {totalNodes} -
-
- -
- {activeNodes.map((node) => ( -
- {node.Hostname} -
- ))} -
-
-
-
-
-
+ + +
+ + Manager Nodes + + Online +
+
+ +
+
+ + + + +
+ {managerNodesCount} / {totalNodes} +
+
+ +
+ {managerNodes.map((node) => ( +
+ {node.Hostname} +
+ ))} +
+
+
+
+
+
+
- - -
- - Manager Nodes - - Online - -
-
- -
-
- - - - -
- {managerNodesCount} / {totalNodes} -
-
- -
- {managerNodes.map((node) => ( -
- {node.Hostname} -
- ))} -
-
-
-
-
-
-
- -
- {nodes.map((node) => ( - - ))} -
-
-
- ); +
+ {nodes.map((node) => ( + + ))} +
+
+
+ ); } From 9f24f24de342cc0b60ca18e75a5da813a317b13f Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Wed, 1 Jan 2025 19:05:06 -0600 Subject: [PATCH 19/21] refactor: improve requests --- .../dashboard/requests/show-requests.tsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/dokploy/components/dashboard/requests/show-requests.tsx b/apps/dokploy/components/dashboard/requests/show-requests.tsx index f5588705d..a12e250b8 100644 --- a/apps/dokploy/components/dashboard/requests/show-requests.tsx +++ b/apps/dokploy/components/dashboard/requests/show-requests.tsx @@ -94,18 +94,18 @@ export const ShowRequests = () => {
- { - isActive ? ( - - ) : ( -
- You need to activate requests -
- ) - } + {isActive ? ( + + ) : ( +
+ + You need to activate requests + +
+ )}
- + {isActive && } ); }; From 3e8708d2b97eb215cd9273d6a154a84e211d0a4a Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Wed, 1 Jan 2025 19:29:33 -0600 Subject: [PATCH 20/21] refactor: add text for run command --- .../dashboard/application/advanced/general/add-command.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx b/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx index f9e70b422..4cd839a11 100644 --- a/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx +++ b/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx @@ -81,7 +81,8 @@ export const AddCommand = ({ applicationId }: Props) => {
Run Command - Run a custom command in the container + Run a custom command in the container after the application + initialized
From 49a6b72c600a3daf2347833fcb2b708b7a1fa1cf Mon Sep 17 00:00:00 2001 From: vishalkadam47 Date: Thu, 2 Jan 2025 21:01:03 +0530 Subject: [PATCH 21/21] refactor: remove unnecessary error logging in GPU setup functions --- packages/server/src/utils/gpu-setup.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/server/src/utils/gpu-setup.ts b/packages/server/src/utils/gpu-setup.ts index 0b49dc6ca..6a6611b4a 100644 --- a/packages/server/src/utils/gpu-setup.ts +++ b/packages/server/src/utils/gpu-setup.ts @@ -35,7 +35,6 @@ export async function checkGPUStatus(serverId?: string): Promise { ...cudaInfo, }; } catch (error) { - console.error("Error in checkGPUStatus:", error); return { driverInstalled: false, driverVersion: undefined, @@ -317,7 +316,6 @@ const setupLocalServer = async (daemonConfig: any) => { try { await execAsync(setupCommands); } catch (error) { - console.error("Setup failed:", error); throw new Error( "Failed to configure GPU support. Please ensure you have sudo privileges and try again.", ); @@ -344,11 +342,10 @@ const verifySetup = async (nodeId: string, serverId?: string) => { "cat /etc/nvidia-container-runtime/config.toml", ].join(" && "); - const { stdout: diagnostics } = serverId - ? await execAsyncRemote(serverId, diagnosticCommands) - : await execAsync(diagnosticCommands); + await (serverId + ? execAsyncRemote(serverId, diagnosticCommands) + : execAsync(diagnosticCommands)); - console.error("Diagnostic Information:", diagnostics); throw new Error("GPU support not detected in swarm after setup"); }