From 9544b2ace3da89f6c45779b6f4c70d890242260c Mon Sep 17 00:00:00 2001 From: Abdenour Tadjer <134706841+AbdenourTadjer33@users.noreply.github.com> Date: Wed, 10 Dec 2025 09:36:17 +0100 Subject: [PATCH 01/12] fix(backups): optional chaining for logCleanupCron --- packages/server/src/utils/backups/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/utils/backups/index.ts b/packages/server/src/utils/backups/index.ts index 050faa886..dfdcd2cac 100644 --- a/packages/server/src/utils/backups/index.ts +++ b/packages/server/src/utils/backups/index.ts @@ -82,7 +82,7 @@ export const initCronJobs = async () => { } } - if (admin?.user.logCleanupCron) { + if (admin?.user?.logCleanupCron) { console.log("Starting log requests cleanup", admin.user.logCleanupCron); await startLogCleanup(admin.user.logCleanupCron); } From a04a4c05ead93260a6cb43f56b55bf4db2c7c88f Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Fri, 12 Dec 2025 10:09:31 -0600 Subject: [PATCH 02/12] chore(dependencies): update Next.js to version 16.0.10 and remove turbopack script from package.json - Updated Next.js version in both root and dokploy package.json files to 16.0.10 for improved performance and features. - Removed the turbopack development script from the dokploy package.json to streamline the development process. - Added volumeBackup property to notification handling in multiple files for enhanced backup options. --- .github/sponsors/awesome.png | Bin 0 -> 2762 bytes README.md | 4 +- .../notifications/handle-notifications.tsx | 4 + apps/dokploy/package.json | 3 +- package.json | 1 - packages/server/src/db/schema/notification.ts | 2 + packages/server/src/services/notification.ts | 2 + pnpm-lock.yaml | 112 +++++++++--------- 8 files changed, 68 insertions(+), 60 deletions(-) create mode 100644 .github/sponsors/awesome.png diff --git a/.github/sponsors/awesome.png b/.github/sponsors/awesome.png new file mode 100644 index 0000000000000000000000000000000000000000..0753212abcbd8171f87d04a10b06ab2b0f5f7166 GIT binary patch literal 2762 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 - + + + diff --git a/apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx b/apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx index 0a513ef23..9e0bc2be5 100644 --- a/apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx +++ b/apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx @@ -369,6 +369,7 @@ export const HandleNotifications = ({ notificationId }: Props) => { webhookUrl: notification.lark?.webhookUrl, name: notification.name, dockerCleanup: notification.dockerCleanup, + volumeBackup: notification.volumeBackup, serverThreshold: notification.serverThreshold, }); } else if (notification.notificationType === "custom") { @@ -388,6 +389,7 @@ export const HandleNotifications = ({ notificationId }: Props) => { ) : [], name: notification.name, + volumeBackup: notification.volumeBackup, dockerCleanup: notification.dockerCleanup, serverThreshold: notification.serverThreshold, }); @@ -522,6 +524,7 @@ export const HandleNotifications = ({ notificationId }: Props) => { appDeploy: appDeploy, dokployRestart: dokployRestart, databaseBackup: databaseBackup, + volumeBackup: volumeBackup, webhookUrl: data.webhookUrl, name: data.name, dockerCleanup: dockerCleanup, @@ -547,6 +550,7 @@ export const HandleNotifications = ({ notificationId }: Props) => { appDeploy: appDeploy, dokployRestart: dokployRestart, databaseBackup: databaseBackup, + volumeBackup: volumeBackup, endpoint: data.endpoint, headers: headersRecord, name: data.name, diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json index f9480f3e5..8572cb3e2 100644 --- a/apps/dokploy/package.json +++ b/apps/dokploy/package.json @@ -13,7 +13,6 @@ "reset-password": "node -r dotenv/config dist/reset-password.mjs", "reset-2fa": "node -r dotenv/config dist/reset-2fa.mjs", "dev": "tsx -r dotenv/config ./server/server.ts --project tsconfig.server.json ", - "dev-turbopack": "TURBOPACK=1 tsx -r dotenv/config ./server/server.ts --project tsconfig.server.json", "studio": "drizzle-kit studio --config ./server/db/drizzle.config.ts", "migration:generate": "drizzle-kit generate --config ./server/db/drizzle.config.ts", "migration:run": "tsx -r dotenv/config migration.ts", @@ -118,7 +117,7 @@ "lucide-react": "^0.469.0", "micromatch": "4.0.8", "nanoid": "3.3.11", - "next": "^16.0.7", + "next": "^16.0.10", "next-i18next": "^15.4.2", "next-themes": "^0.2.1", "nextjs-toploader": "^3.9.17", diff --git a/package.json b/package.json index 4ce1089eb..1f59cc661 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "scripts": { "dokploy:setup": "pnpm --filter=dokploy run setup", "dokploy:dev": "pnpm --filter=dokploy run dev", - "dokploy:dev:turbopack": "pnpm --filter=dokploy run dev-turbopack", "dokploy:build": "pnpm --filter=dokploy run build", "dokploy:start": "pnpm --filter=dokploy run start", "test": "pnpm --filter=dokploy run test", diff --git a/packages/server/src/db/schema/notification.ts b/packages/server/src/db/schema/notification.ts index 9b1b6bc38..44dadac8f 100644 --- a/packages/server/src/db/schema/notification.ts +++ b/packages/server/src/db/schema/notification.ts @@ -390,6 +390,7 @@ export const apiCreateCustom = notificationsSchema .pick({ appBuildError: true, databaseBackup: true, + volumeBackup: true, dokployRestart: true, name: true, appDeploy: true, @@ -416,6 +417,7 @@ export const apiCreateLark = notificationsSchema .pick({ appBuildError: true, databaseBackup: true, + volumeBackup: true, dokployRestart: true, name: true, appDeploy: true, diff --git a/packages/server/src/services/notification.ts b/packages/server/src/services/notification.ts index 399c19f0c..ca6b4ded6 100644 --- a/packages/server/src/services/notification.ts +++ b/packages/server/src/services/notification.ts @@ -653,6 +653,7 @@ export const updateCustomNotification = async ( appDeploy: input.appDeploy, appBuildError: input.appBuildError, databaseBackup: input.databaseBackup, + volumeBackup: input.volumeBackup, dokployRestart: input.dokployRestart, dockerCleanup: input.dockerCleanup, organizationId: input.organizationId, @@ -772,6 +773,7 @@ export const updateLarkNotification = async ( appDeploy: input.appDeploy, appBuildError: input.appBuildError, databaseBackup: input.databaseBackup, + volumeBackup: input.volumeBackup, dokployRestart: input.dokployRestart, dockerCleanup: input.dockerCleanup, organizationId: input.organizationId, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b96174ee3..a1d8e5c0d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -62,7 +62,7 @@ importers: version: 4.7.10 inngest: specifier: 3.40.1 - version: 3.40.1(h3@1.15.3)(hono@4.7.10)(next@16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(typescript@5.8.3) + version: 3.40.1(h3@1.15.3)(hono@4.7.10)(next@16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(typescript@5.8.3) pino: specifier: 9.4.0 version: 9.4.0 @@ -237,7 +237,7 @@ importers: version: 10.45.2(@trpc/server@10.45.2) '@trpc/next': specifier: ^10.45.2 - version: 10.45.2(@tanstack/react-query@4.36.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/react-query@10.45.2(@tanstack/react-query@4.36.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/server@10.45.2)(next@16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 10.45.2(@tanstack/react-query@4.36.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/react-query@10.45.2(@tanstack/react-query@4.36.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/server@10.45.2)(next@16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@trpc/react-query': specifier: ^10.45.2 version: 10.45.2(@tanstack/react-query@4.36.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -338,17 +338,17 @@ importers: specifier: 3.3.11 version: 3.3.11 next: - specifier: ^16.0.7 - version: 16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + specifier: ^16.0.10 + version: 16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) next-i18next: specifier: ^15.4.2 - version: 15.4.2(i18next@23.16.8)(next@16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-i18next@15.5.2(i18next@23.16.8)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.8.3))(react@18.2.0) + version: 15.4.2(i18next@23.16.8)(next@16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-i18next@15.5.2(i18next@23.16.8)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.8.3))(react@18.2.0) next-themes: specifier: ^0.2.1 - version: 0.2.1(next@16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 0.2.1(next@16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) nextjs-toploader: specifier: ^3.9.17 - version: 3.9.17(next@16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 3.9.17(next@16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) node-os-utils: specifier: 2.0.1 version: 2.0.1 @@ -1962,53 +1962,53 @@ packages: peerDependencies: redis: ^4.7.0 - '@next/env@16.0.7': - resolution: {integrity: sha512-gpaNgUh5nftFKRkRQGnVi5dpcYSKGcZZkQffZ172OrG/XkrnS7UBTQ648YY+8ME92cC4IojpI2LqTC8sTDhAaw==} + '@next/env@16.0.10': + resolution: {integrity: sha512-8tuaQkyDVgeONQ1MeT9Mkk8pQmZapMKFh5B+OrFUlG3rVmYTXcXlBetBgTurKXGaIZvkoqRT9JL5K3phXcgang==} - '@next/swc-darwin-arm64@16.0.7': - resolution: {integrity: sha512-LlDtCYOEj/rfSnEn/Idi+j1QKHxY9BJFmxx7108A6D8K0SB+bNgfYQATPk/4LqOl4C0Wo3LACg2ie6s7xqMpJg==} + '@next/swc-darwin-arm64@16.0.10': + resolution: {integrity: sha512-4XgdKtdVsaflErz+B5XeG0T5PeXKDdruDf3CRpnhN+8UebNa5N2H58+3GDgpn/9GBurrQ1uWW768FfscwYkJRg==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@next/swc-darwin-x64@16.0.7': - resolution: {integrity: sha512-rtZ7BhnVvO1ICf3QzfW9H3aPz7GhBrnSIMZyr4Qy6boXF0b5E3QLs+cvJmg3PsTCG2M1PBoC+DANUi4wCOKXpA==} + '@next/swc-darwin-x64@16.0.10': + resolution: {integrity: sha512-spbEObMvRKkQ3CkYVOME+ocPDFo5UqHb8EMTS78/0mQ+O1nqE8toHJVioZo4TvebATxgA8XMTHHrScPrn68OGw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-linux-arm64-gnu@16.0.7': - resolution: {integrity: sha512-mloD5WcPIeIeeZqAIP5c2kdaTa6StwP4/2EGy1mUw8HiexSHGK/jcM7lFuS3u3i2zn+xH9+wXJs6njO7VrAqww==} + '@next/swc-linux-arm64-gnu@16.0.10': + resolution: {integrity: sha512-uQtWE3X0iGB8apTIskOMi2w/MKONrPOUCi5yLO+v3O8Mb5c7K4Q5KD1jvTpTF5gJKa3VH/ijKjKUq9O9UhwOYw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-musl@16.0.7': - resolution: {integrity: sha512-+ksWNrZrthisXuo9gd1XnjHRowCbMtl/YgMpbRvFeDEqEBd523YHPWpBuDjomod88U8Xliw5DHhekBC3EOOd9g==} + '@next/swc-linux-arm64-musl@16.0.10': + resolution: {integrity: sha512-llA+hiDTrYvyWI21Z0L1GiXwjQaanPVQQwru5peOgtooeJ8qx3tlqRV2P7uH2pKQaUfHxI/WVarvI5oYgGxaTw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-x64-gnu@16.0.7': - resolution: {integrity: sha512-4WtJU5cRDxpEE44Ana2Xro1284hnyVpBb62lIpU5k85D8xXxatT+rXxBgPkc7C1XwkZMWpK5rXLXTh9PFipWsA==} + '@next/swc-linux-x64-gnu@16.0.10': + resolution: {integrity: sha512-AK2q5H0+a9nsXbeZ3FZdMtbtu9jxW4R/NgzZ6+lrTm3d6Zb7jYrWcgjcpM1k8uuqlSy4xIyPR2YiuUr+wXsavA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-linux-x64-musl@16.0.7': - resolution: {integrity: sha512-HYlhqIP6kBPXalW2dbMTSuB4+8fe+j9juyxwfMwCe9kQPPeiyFn7NMjNfoFOfJ2eXkeQsoUGXg+O2SE3m4Qg2w==} + '@next/swc-linux-x64-musl@16.0.10': + resolution: {integrity: sha512-1TDG9PDKivNw5550S111gsO4RGennLVl9cipPhtkXIFVwo31YZ73nEbLjNC8qG3SgTz/QZyYyaFYMeY4BKZR/g==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-win32-arm64-msvc@16.0.7': - resolution: {integrity: sha512-EviG+43iOoBRZg9deGauXExjRphhuYmIOJ12b9sAPy0eQ6iwcPxfED2asb/s2/yiLYOdm37kPaiZu8uXSYPs0Q==} + '@next/swc-win32-arm64-msvc@16.0.10': + resolution: {integrity: sha512-aEZIS4Hh32xdJQbHz121pyuVZniSNoqDVx1yIr2hy+ZwJGipeqnMZBJHyMxv2tiuAXGx6/xpTcQJ6btIiBjgmg==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-x64-msvc@16.0.7': - resolution: {integrity: sha512-gniPjy55zp5Eg0896qSrf3yB1dw4F/3s8VK1ephdsZZ129j2n6e1WqCbE2YgcKhW9hPB9TVZENugquWJD5x0ug==} + '@next/swc-win32-x64-msvc@16.0.10': + resolution: {integrity: sha512-E+njfCoFLb01RAFEnGZn6ERoOqhK1Gl3Lfz1Kjnj0Ulfu7oJbuMyvBKNj/bw8XZnenHDASlygTjZICQW+rYW1Q==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -6257,8 +6257,8 @@ packages: react: '*' react-dom: '*' - next@16.0.7: - resolution: {integrity: sha512-3mBRJyPxT4LOxAJI6IsXeFtKfiJUbjCLgvXO02fV8Wy/lIhPvP94Fe7dGhUgHXcQy4sSuYwQNcOLhIfOm0rL0A==} + next@16.0.10: + resolution: {integrity: sha512-RtWh5PUgI+vxlV3HdR+IfWA1UUHu0+Ram/JBO4vWB54cVPentCD0e+lxyAYEsDTqGGMg7qpjhKh6dc6aW7W/sA==} engines: {node: '>=20.9.0'} hasBin: true peerDependencies: @@ -8777,30 +8777,30 @@ snapshots: async-await-queue: 2.1.4 redis: 4.7.0 - '@next/env@16.0.7': {} + '@next/env@16.0.10': {} - '@next/swc-darwin-arm64@16.0.7': + '@next/swc-darwin-arm64@16.0.10': optional: true - '@next/swc-darwin-x64@16.0.7': + '@next/swc-darwin-x64@16.0.10': optional: true - '@next/swc-linux-arm64-gnu@16.0.7': + '@next/swc-linux-arm64-gnu@16.0.10': optional: true - '@next/swc-linux-arm64-musl@16.0.7': + '@next/swc-linux-arm64-musl@16.0.10': optional: true - '@next/swc-linux-x64-gnu@16.0.7': + '@next/swc-linux-x64-gnu@16.0.10': optional: true - '@next/swc-linux-x64-musl@16.0.7': + '@next/swc-linux-x64-musl@16.0.10': optional: true - '@next/swc-win32-arm64-msvc@16.0.7': + '@next/swc-win32-arm64-msvc@16.0.10': optional: true - '@next/swc-win32-x64-msvc@16.0.7': + '@next/swc-win32-x64-msvc@16.0.10': optional: true '@noble/ciphers@0.6.0': {} @@ -11244,13 +11244,13 @@ snapshots: dependencies: '@trpc/server': 10.45.2 - '@trpc/next@10.45.2(@tanstack/react-query@4.36.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/react-query@10.45.2(@tanstack/react-query@4.36.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/server@10.45.2)(next@16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + '@trpc/next@10.45.2(@tanstack/react-query@4.36.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/react-query@10.45.2(@tanstack/react-query@4.36.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/server@10.45.2)(next@16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@tanstack/react-query': 4.36.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@trpc/client': 10.45.2(@trpc/server@10.45.2) '@trpc/react-query': 10.45.2(@tanstack/react-query@4.36.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@trpc/server': 10.45.2 - next: 16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + next: 16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -12951,7 +12951,7 @@ snapshots: inline-style-parser@0.2.4: {} - inngest@3.40.1(h3@1.15.3)(hono@4.7.10)(next@16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(typescript@5.8.3): + inngest@3.40.1(h3@1.15.3)(hono@4.7.10)(next@16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(typescript@5.8.3): dependencies: '@bufbuild/protobuf': 2.6.3 '@inngest/ai': 0.1.5 @@ -12978,7 +12978,7 @@ snapshots: optionalDependencies: h3: 1.15.3 hono: 4.7.10 - next: 16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + next: 16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) typescript: 5.8.3 transitivePeerDependencies: - encoding @@ -13789,7 +13789,7 @@ snapshots: neotraverse@0.6.18: {} - next-i18next@15.4.2(i18next@23.16.8)(next@16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-i18next@15.5.2(i18next@23.16.8)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.8.3))(react@18.2.0): + next-i18next@15.4.2(i18next@23.16.8)(next@16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-i18next@15.5.2(i18next@23.16.8)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.8.3))(react@18.2.0): dependencies: '@babel/runtime': 7.27.3 '@types/hoist-non-react-statics': 3.3.6 @@ -13797,19 +13797,19 @@ snapshots: hoist-non-react-statics: 3.3.2 i18next: 23.16.8 i18next-fs-backend: 2.6.0 - next: 16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + next: 16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: 18.2.0 react-i18next: 15.5.2(i18next@23.16.8)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.8.3) - next-themes@0.2.1(next@16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + next-themes@0.2.1(next@16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: - next: 16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + next: 16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - next@16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + next@16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: - '@next/env': 16.0.7 + '@next/env': 16.0.10 '@swc/helpers': 0.5.15 caniuse-lite: 1.0.30001718 postcss: 8.4.31 @@ -13817,23 +13817,23 @@ snapshots: react-dom: 18.2.0(react@18.2.0) styled-jsx: 5.1.6(react@18.2.0) optionalDependencies: - '@next/swc-darwin-arm64': 16.0.7 - '@next/swc-darwin-x64': 16.0.7 - '@next/swc-linux-arm64-gnu': 16.0.7 - '@next/swc-linux-arm64-musl': 16.0.7 - '@next/swc-linux-x64-gnu': 16.0.7 - '@next/swc-linux-x64-musl': 16.0.7 - '@next/swc-win32-arm64-msvc': 16.0.7 - '@next/swc-win32-x64-msvc': 16.0.7 + '@next/swc-darwin-arm64': 16.0.10 + '@next/swc-darwin-x64': 16.0.10 + '@next/swc-linux-arm64-gnu': 16.0.10 + '@next/swc-linux-arm64-musl': 16.0.10 + '@next/swc-linux-x64-gnu': 16.0.10 + '@next/swc-linux-x64-musl': 16.0.10 + '@next/swc-win32-arm64-msvc': 16.0.10 + '@next/swc-win32-x64-msvc': 16.0.10 '@opentelemetry/api': 1.9.0 sharp: 0.34.5 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros - nextjs-toploader@3.9.17(next@16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + nextjs-toploader@3.9.17(next@16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: - next: 16.0.7(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + next: 16.0.10(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) nprogress: 0.2.0 prop-types: 15.8.1 react: 18.2.0 From b230687c8a74b2c786ed13b21f94f2c89c68a8fa Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Fri, 12 Dec 2025 10:14:03 -0600 Subject: [PATCH 03/12] fix(environment): prevent renaming of the default environment - Updated the logic to disallow renaming the default environment while still allowing updates to its description and other properties. - Adjusted error message for clarity when attempting to rename the default environment. --- apps/dokploy/server/api/routers/environment.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/dokploy/server/api/routers/environment.ts b/apps/dokploy/server/api/routers/environment.ts index 5a7f625d4..63863b26e 100644 --- a/apps/dokploy/server/api/routers/environment.ts +++ b/apps/dokploy/server/api/routers/environment.ts @@ -256,10 +256,11 @@ export const environmentRouter = createTRPCRouter({ } const currentEnvironment = await findEnvironmentById(environmentId); - if (currentEnvironment.isDefault) { + // Prevent renaming the default environment, but allow updating env and description + if (currentEnvironment.isDefault && updateData.name !== undefined) { throw new TRPCError({ code: "BAD_REQUEST", - message: "You cannot update the default environment", + message: "You cannot rename the default environment", }); } if ( From 1c83919408a05f753d02715329bf9140d80f842a Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Fri, 12 Dec 2025 10:15:16 -0600 Subject: [PATCH 04/12] fix(environment): prevent deletion of the default environment - Added logic to disallow deletion of the default environment, throwing a BAD_REQUEST error if an attempt is made to delete it. --- apps/dokploy/server/api/routers/environment.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/dokploy/server/api/routers/environment.ts b/apps/dokploy/server/api/routers/environment.ts index 63863b26e..9f5eb45c2 100644 --- a/apps/dokploy/server/api/routers/environment.ts +++ b/apps/dokploy/server/api/routers/environment.ts @@ -208,6 +208,14 @@ export const environmentRouter = createTRPCRouter({ }); } + // Prevent deletion of the default environment + if (environment.isDefault) { + throw new TRPCError({ + code: "BAD_REQUEST", + message: "You cannot delete the default environment", + }); + } + // Check environment deletion permission await checkEnvironmentDeletionPermission( ctx.user.id, From 4f6eb51c06e59b0a9f09cfdc423ccd1a2d1396c0 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Fri, 12 Dec 2025 10:23:47 -0600 Subject: [PATCH 05/12] fix(environment): clarify .env file creation instructions - Updated the description for the environment file creation option to specify that the .env file will be created in the same directory as the Dockerfile during the build process, enhancing user understanding. --- .../components/dashboard/application/environment/show.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/environment/show.tsx b/apps/dokploy/components/dashboard/application/environment/show.tsx index 5de03c367..cbbd105df 100644 --- a/apps/dokploy/components/dashboard/application/environment/show.tsx +++ b/apps/dokploy/components/dashboard/application/environment/show.tsx @@ -191,9 +191,10 @@ export const ShowEnvironment = ({ applicationId }: Props) => {
Create Environment File - When enabled, an .env file will be created during the - build process. Disable this if you don't want to generate - an environment file. + When enabled, an .env file will be created in the same + directory as your Dockerfile during the build process. + Disable this if you don't want to generate an environment + file.
From ee9edd7ff4c451541359869170a7cf2cd217d5ba Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Fri, 12 Dec 2025 10:55:42 -0600 Subject: [PATCH 06/12] chore(version): bump dokploy version to v0.26.2 --- apps/dokploy/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json index 8572cb3e2..51785dd5c 100644 --- a/apps/dokploy/package.json +++ b/apps/dokploy/package.json @@ -1,6 +1,6 @@ { "name": "dokploy", - "version": "v0.26.1", + "version": "v0.26.2", "private": true, "license": "Apache-2.0", "type": "module", From a32e7e00417d96bde8181d5797a60e29f3ce2564 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sat, 13 Dec 2025 00:04:14 -0600 Subject: [PATCH 07/12] fix(build-server): enforce selection rules for Build Server and Build Registry - Updated validation schema to require that both Build Server and Build Registry must be selected together or both set to None. - Added informational alert to guide users on the selection requirements. - Enhanced onChange handlers to reset the corresponding field when one is set to "none". --- .../advanced/show-build-server.tsx | 50 ++++++++++++++++--- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/advanced/show-build-server.tsx b/apps/dokploy/components/dashboard/application/advanced/show-build-server.tsx index caa2b8e35..545a5f705 100644 --- a/apps/dokploy/components/dashboard/application/advanced/show-build-server.tsx +++ b/apps/dokploy/components/dashboard/application/advanced/show-build-server.tsx @@ -38,10 +38,31 @@ interface Props { applicationId: string; } -const schema = z.object({ - buildServerId: z.string().min(1, "Build server is required"), - buildRegistryId: z.string().min(1, "Build registry is required"), -}); +const schema = z + .object({ + buildServerId: z.string().optional(), + buildRegistryId: z.string().optional(), + }) + .refine( + (data) => { + // Both empty/none is valid + const buildServerIsNone = + !data.buildServerId || data.buildServerId === "none"; + const buildRegistryIsNone = + !data.buildRegistryId || data.buildRegistryId === "none"; + + // Both should be either filled or empty + if (buildServerIsNone && buildRegistryIsNone) return true; + if (!buildServerIsNone && !buildRegistryIsNone) return true; + + return false; + }, + { + message: + "Both Build Server and Build Registry must be selected together, or both set to None", + path: ["buildServerId"], // Show error on buildServerId field + }, + ); type Schema = z.infer; @@ -121,6 +142,11 @@ export const ShowBuildServer = ({ applicationId }: Props) => { container starts running. + + Note: Build Server and Build Registry must be + configured together. You can either select both or set both to None. + + {!registries || registries.length === 0 ? ( You need to add at least one registry to use build servers. Please @@ -147,7 +173,13 @@ export const ShowBuildServer = ({ applicationId }: Props) => { Build Server { + field.onChange(value); + // If setting to "none", also reset build server to "none" + if (value === "none") { + form.setValue("buildServerId", "none"); + } + }} value={field.value || "none"} > From 092afbe1fa308cea36b633eb6e2896a0b28644cb Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sat, 13 Dec 2025 00:32:26 -0600 Subject: [PATCH 08/12] fix(dashboard): update project environment link to use default production environment - Modified the project environment link to reference the default production environment instead of the first environment in the list, improving accuracy in navigation. --- apps/dokploy/components/dashboard/projects/show.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/dokploy/components/dashboard/projects/show.tsx b/apps/dokploy/components/dashboard/projects/show.tsx index 5f7469050..9ce42c1a0 100644 --- a/apps/dokploy/components/dashboard/projects/show.tsx +++ b/apps/dokploy/components/dashboard/projects/show.tsx @@ -286,13 +286,17 @@ export const ShowProjects = () => { ) .some(Boolean); + const productionEnvironment = project?.environments.find( + (env) => env.isDefault, + ); + return (
{haveServicesWithDomains ? ( From fea3ec9a6fbdb0147ed20de96b24a803325e48ac Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sat, 13 Dec 2025 00:57:41 -0600 Subject: [PATCH 09/12] feat(cleanup): implement background cleanup functionality - Added a new `cleanupAllBackground` function to execute Docker cleanup commands in the background, allowing for immediate return and avoiding gateway timeouts. - Refactored existing cleanup functions to utilize a centralized `cleanupCommands` object for better maintainability and readability. --- apps/dokploy/server/api/routers/settings.ts | 6 ++- packages/server/src/utils/docker/utils.ts | 46 ++++++++++++++++++--- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/apps/dokploy/server/api/routers/settings.ts b/apps/dokploy/server/api/routers/settings.ts index 00584bf2d..a6154ec1c 100644 --- a/apps/dokploy/server/api/routers/settings.ts +++ b/apps/dokploy/server/api/routers/settings.ts @@ -3,6 +3,7 @@ import { checkGPUStatus, checkPortInUse, cleanupAll, + cleanupAllBackground, cleanupBuilders, cleanupContainers, cleanupImages, @@ -193,9 +194,10 @@ export const settingsRouter = createTRPCRouter({ cleanAll: adminProcedure .input(apiServerSchema) .mutation(async ({ input }) => { - await cleanupAll(input?.serverId); + // Execute cleanup in background and return immediately to avoid gateway timeouts + const result = await cleanupAllBackground(input?.serverId); - return true; + return result; }), cleanMonitoring: adminProcedure.mutation(async () => { if (IS_CLOUD) { diff --git a/packages/server/src/utils/docker/utils.ts b/packages/server/src/utils/docker/utils.ts index 5c7326e2d..d674a8840 100644 --- a/packages/server/src/utils/docker/utils.ts +++ b/packages/server/src/utils/docker/utils.ts @@ -171,9 +171,17 @@ ${exec} echo "Execution completed."`; +const cleanupCommands = { + containers: "docker container prune --force", + images: "docker image prune --all --force", + builders: "docker builder prune --all --force", + system: "docker system prune --all --force", + volumes: "docker volume prune --all --force", +}; + export const cleanupContainers = async (serverId?: string) => { try { - const command = "docker container prune --force"; + const command = cleanupCommands.containers; if (serverId) { await execAsyncRemote(serverId, dockerSafeExec(command)); @@ -189,7 +197,7 @@ export const cleanupContainers = async (serverId?: string) => { export const cleanupImages = async (serverId?: string) => { try { - const command = "docker image prune --all --force"; + const command = cleanupCommands.images; if (serverId) { await execAsyncRemote(serverId, dockerSafeExec(command)); @@ -203,7 +211,7 @@ export const cleanupImages = async (serverId?: string) => { export const cleanupVolumes = async (serverId?: string) => { try { - const command = "docker volume prune --all --force"; + const command = cleanupCommands.volumes; if (serverId) { await execAsyncRemote(serverId, dockerSafeExec(command)); @@ -219,7 +227,7 @@ export const cleanupVolumes = async (serverId?: string) => { export const cleanupBuilders = async (serverId?: string) => { try { - const command = "docker builder prune --all --force"; + const command = cleanupCommands.builders; if (serverId) { await execAsyncRemote(serverId, dockerSafeExec(command)); @@ -235,7 +243,7 @@ export const cleanupBuilders = async (serverId?: string) => { export const cleanupSystem = async (serverId?: string) => { try { - const command = "docker system prune --all --force"; + const command = cleanupCommands.system; if (serverId) { await execAsyncRemote(serverId, dockerSafeExec(command)); @@ -256,6 +264,34 @@ export const cleanupAll = async (serverId?: string) => { await cleanupSystem(serverId); }; +export const cleanupAllBackground = async (serverId?: string) => { + Promise.allSettled( + Object.values(cleanupCommands).map(async (command) => { + try { + if (serverId) { + await execAsyncRemote(serverId, dockerSafeExec(command)); + } else { + await execAsync(dockerSafeExec(command)); + } + } catch (error) {} + }), + ) + .then((results) => { + const failed = results.filter((r) => r.status === "rejected"); + if (failed.length > 0) { + console.error(`Docker cleanup: ${failed.length} operations failed`); + } else { + console.log("Docker cleanup completed successfully"); + } + }) + .catch((error) => console.error("Error in cleanup:", error)); + + return { + status: "scheduled", + message: "Docker cleanup has been initiated in the background", + }; +}; + export const startService = async (appName: string) => { try { await execAsync(`docker service scale ${appName}=1 `); From 12b8f8a4fd1757f51c4f2fc21e28f3f5e7c1cdfe Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sat, 13 Dec 2025 00:58:07 -0600 Subject: [PATCH 10/12] fix(storage): update success message for cleaning action --- .../dashboard/settings/servers/actions/show-storage-actions.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx b/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx index 41c8ae5c5..cb6b6013a 100644 --- a/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx @@ -173,7 +173,7 @@ export const ShowStorageActions = ({ serverId }: Props) => { serverId: serverId, }) .then(async () => { - toast.success("Cleaned all"); + toast.success("Cleaning in progress..."); }) .catch(() => { toast.error("Error cleaning all"); From 415327c2464beb411c39843f813861ed38aed948 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sat, 13 Dec 2025 00:58:21 -0600 Subject: [PATCH 11/12] fix(storage): enhance success message for cleaning action to include a wait prompt --- .../dashboard/settings/servers/actions/show-storage-actions.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx b/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx index cb6b6013a..c80648142 100644 --- a/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx @@ -173,7 +173,7 @@ export const ShowStorageActions = ({ serverId }: Props) => { serverId: serverId, }) .then(async () => { - toast.success("Cleaning in progress..."); + toast.success("Cleaning in progress... Please wait"); }) .catch(() => { toast.error("Error cleaning all"); From d187b52e095ac2284baa88f1b934821e47e89c7a Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sat, 13 Dec 2025 01:28:19 -0600 Subject: [PATCH 12/12] refactor(deploy): execute deployments in background to prevent timeouts - Updated deployment logic across multiple API routes to run deployments in the background, allowing for immediate response and avoiding potential webhook timeouts. - Added error handling to log any failures during background deployment. --- .../pages/api/deploy/[refreshToken].ts | 22 ++++++++++--------- .../api/deploy/compose/[refreshToken].ts | 22 ++++++++++--------- apps/dokploy/pages/api/deploy/github.ts | 20 ++++++++++++----- .../dokploy/server/api/routers/application.ts | 12 +++++++--- apps/dokploy/server/api/routers/compose.ts | 8 +++++-- 5 files changed, 54 insertions(+), 30 deletions(-) diff --git a/apps/dokploy/pages/api/deploy/[refreshToken].ts b/apps/dokploy/pages/api/deploy/[refreshToken].ts index 78e026257..415ece29b 100644 --- a/apps/dokploy/pages/api/deploy/[refreshToken].ts +++ b/apps/dokploy/pages/api/deploy/[refreshToken].ts @@ -242,17 +242,19 @@ export default async function handler( if (IS_CLOUD && application.serverId) { jobData.serverId = application.serverId; - await deploy(jobData); - return true; + deploy(jobData).catch((error) => { + console.error("Background deployment failed:", error); + }); + } else { + await myQueue.add( + "deployments", + { ...jobData }, + { + removeOnComplete: true, + removeOnFail: true, + }, + ); } - await myQueue.add( - "deployments", - { ...jobData }, - { - removeOnComplete: true, - removeOnFail: true, - }, - ); } catch (error) { res.status(400).json({ message: "Error deploying Application", error }); return; diff --git a/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts b/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts index 61c7f7157..d9b5ef2a2 100644 --- a/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts +++ b/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts @@ -179,17 +179,19 @@ export default async function handler( if (IS_CLOUD && composeResult.serverId) { jobData.serverId = composeResult.serverId; - await deploy(jobData); - return true; + deploy(jobData).catch((error) => { + console.error("Background deployment failed:", error); + }); + } else { + await myQueue.add( + "deployments", + { ...jobData }, + { + removeOnComplete: true, + removeOnFail: true, + }, + ); } - await myQueue.add( - "deployments", - { ...jobData }, - { - removeOnComplete: true, - removeOnFail: true, - }, - ); } catch (error) { res.status(400).json({ message: "Error deploying Compose", error }); return; diff --git a/apps/dokploy/pages/api/deploy/github.ts b/apps/dokploy/pages/api/deploy/github.ts index 92cf3dc9e..9369e800e 100644 --- a/apps/dokploy/pages/api/deploy/github.ts +++ b/apps/dokploy/pages/api/deploy/github.ts @@ -128,7 +128,9 @@ export default async function handler( if (IS_CLOUD && app.serverId) { jobData.serverId = app.serverId; - await deploy(jobData); + deploy(jobData).catch((error) => { + console.error("Background deployment failed:", error); + }); continue; } await myQueue.add( @@ -165,7 +167,9 @@ export default async function handler( if (IS_CLOUD && composeApp.serverId) { jobData.serverId = composeApp.serverId; - await deploy(jobData); + deploy(jobData).catch((error) => { + console.error("Background deployment failed:", error); + }); continue; } @@ -246,7 +250,9 @@ export default async function handler( if (IS_CLOUD && app.serverId) { jobData.serverId = app.serverId; - await deploy(jobData); + deploy(jobData).catch((error) => { + console.error("Background deployment failed:", error); + }); continue; } await myQueue.add( @@ -291,7 +297,9 @@ export default async function handler( } if (IS_CLOUD && composeApp.serverId) { jobData.serverId = composeApp.serverId; - await deploy(jobData); + deploy(jobData).catch((error) => { + console.error("Background deployment failed:", error); + }); continue; } @@ -491,7 +499,9 @@ export default async function handler( if (IS_CLOUD && app.serverId) { jobData.serverId = app.serverId; - await deploy(jobData); + deploy(jobData).catch((error) => { + console.error("Background deployment failed:", error); + }); continue; } await myQueue.add( diff --git a/apps/dokploy/server/api/routers/application.ts b/apps/dokploy/server/api/routers/application.ts index 4149c79f0..c0666fcc7 100644 --- a/apps/dokploy/server/api/routers/application.ts +++ b/apps/dokploy/server/api/routers/application.ts @@ -336,7 +336,9 @@ export const applicationRouter = createTRPCRouter({ if (IS_CLOUD && application.serverId) { jobData.serverId = application.serverId; - await deploy(jobData); + deploy(jobData).catch((error) => { + console.error("Background deployment failed:", error); + }); return true; } await myQueue.add( @@ -701,7 +703,9 @@ export const applicationRouter = createTRPCRouter({ }; if (IS_CLOUD && application.serverId) { jobData.serverId = application.serverId; - await deploy(jobData); + deploy(jobData).catch((error) => { + console.error("Background deployment failed:", error); + }); return true; } @@ -813,7 +817,9 @@ export const applicationRouter = createTRPCRouter({ }; if (IS_CLOUD && app.serverId) { jobData.serverId = app.serverId; - await deploy(jobData); + deploy(jobData).catch((error) => { + console.error("Background deployment failed:", error); + }); return true; } diff --git a/apps/dokploy/server/api/routers/compose.ts b/apps/dokploy/server/api/routers/compose.ts index e233dc6ca..3261f61fa 100644 --- a/apps/dokploy/server/api/routers/compose.ts +++ b/apps/dokploy/server/api/routers/compose.ts @@ -417,7 +417,9 @@ export const composeRouter = createTRPCRouter({ if (IS_CLOUD && compose.serverId) { jobData.serverId = compose.serverId; - await deploy(jobData); + deploy(jobData).catch((error) => { + console.error("Background deployment failed:", error); + }); return true; } await myQueue.add( @@ -453,7 +455,9 @@ export const composeRouter = createTRPCRouter({ }; if (IS_CLOUD && compose.serverId) { jobData.serverId = compose.serverId; - await deploy(jobData); + deploy(jobData).catch((error) => { + console.error("Background deployment failed:", error); + }); return true; } await myQueue.add(