From 55f75bce531b6ac1b60f11d3e05830dc8b83318e Mon Sep 17 00:00:00 2001 From: Marukome0743 Date: Mon, 14 Jul 2025 15:30:05 +0900 Subject: [PATCH 01/17] chore: version up format.yml actions --- .github/workflows/format.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 827ccc709..cfddad7b2 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -11,12 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup biomeJs uses: biomejs/setup-biome@v2 - name: Run Biome formatter - run: biome format . --write + run: biome format --write - - uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef + - uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # v1.3.2 From c4fec8cee5682228e10be2015eda066775264c18 Mon Sep 17 00:00:00 2001 From: Marukome0743 Date: Mon, 14 Jul 2025 15:30:22 +0900 Subject: [PATCH 02/17] chore: upgrade to Biome v2 --- biome.json | 31 +++++++++++++-------- package.json | 11 ++++++-- pnpm-lock.yaml | 74 +++++++++++++++++++++++++------------------------- 3 files changed, 65 insertions(+), 51 deletions(-) diff --git a/biome.json b/biome.json index cf677ec40..3309d3a86 100644 --- a/biome.json +++ b/biome.json @@ -1,18 +1,17 @@ { "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", "files": { - "ignore": [ - "node_modules/**", - ".next/**", - "drizzle/**", - ".docker", - "dist", - "packages/server/package.json" + "includes": [ + "**", + "!**/.docker", + "!**/.next/**", + "!**/dist", + "!**/drizzle/**", + "!node_modules/**", + "!packages/server/package.json" ] }, - "organizeImports": { - "enabled": true - }, + "assist": { "actions": { "source": { "organizeImports": "on" } } }, "linter": { "rules": { "security": { @@ -30,7 +29,17 @@ "noUnusedVariables": "error" }, "style": { - "noNonNullAssertion": "off" + "noNonNullAssertion": "off", + "noParameterAssign": "error", + "useAsConstAssertion": "error", + "useDefaultParameterLast": "error", + "useEnumInitializers": "error", + "useSelfClosingElements": "error", + "useSingleVarDeclarator": "error", + "noUnusedTemplateLiteral": "error", + "useNumberNamespace": "error", + "noInferrableTypes": "error", + "noUselessElse": "error" }, "suspicious": { "noArrayIndexKey": "off", diff --git a/package.json b/package.json index f628e09fd..b895ffcff 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,10 @@ { "name": "dokploy", "private": true, - "workspaces": ["apps/*", "packages/*"], + "workspaces": [ + "apps/*", + "packages/*" + ], "scripts": { "dokploy:setup": "pnpm --filter=dokploy run setup", "dokploy:dev": "pnpm --filter=dokploy run dev", @@ -20,7 +23,7 @@ "format-and-lint:fix": "biome check . --write" }, "devDependencies": { - "@biomejs/biome": "1.9.4", + "@biomejs/biome": "2.1.1", "@commitlint/cli": "^19.8.1", "@commitlint/config-conventional": "^19.8.1", "@types/node": "^18.19.104", @@ -41,7 +44,9 @@ ] }, "commitlint": { - "extends": ["@commitlint/config-conventional"] + "extends": [ + "@commitlint/config-conventional" + ] }, "resolutions": { "@types/react": "18.3.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 46ef96acc..ad02cc282 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,8 +13,8 @@ importers: .: devDependencies: '@biomejs/biome': - specifier: 1.9.4 - version: 1.9.4 + specifier: 2.1.1 + version: 2.1.1 '@commitlint/cli': specifier: ^19.8.1 version: 19.8.1(@types/node@18.19.104)(typescript@5.8.3) @@ -933,55 +933,55 @@ packages: '@better-fetch/fetch@1.1.18': resolution: {integrity: sha512-rEFOE1MYIsBmoMJtQbl32PGHHXuG2hDxvEd7rUHE0vCBoFQVSDqaVs9hkZEtHCxRoY+CljXKFCOuJ8uxqw1LcA==} - '@biomejs/biome@1.9.4': - resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} + '@biomejs/biome@2.1.1': + resolution: {integrity: sha512-HFGYkxG714KzG+8tvtXCJ1t1qXQMzgWzfvQaUjxN6UeKv+KvMEuliInnbZLJm6DXFXwqVi6446EGI0sGBLIYng==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@1.9.4': - resolution: {integrity: sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==} + '@biomejs/cli-darwin-arm64@2.1.1': + resolution: {integrity: sha512-2Muinu5ok4tWxq4nu5l19el48cwCY/vzvI7Vjbkf3CYIQkjxZLyj0Ad37Jv2OtlXYaLvv+Sfu1hFeXt/JwRRXQ==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@1.9.4': - resolution: {integrity: sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==} + '@biomejs/cli-darwin-x64@2.1.1': + resolution: {integrity: sha512-cC8HM5lrgKQXLAK+6Iz2FrYW5A62pAAX6KAnRlEyLb+Q3+Kr6ur/sSuoIacqlp1yvmjHJqjYfZjPvHWnqxoEIA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@1.9.4': - resolution: {integrity: sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==} + '@biomejs/cli-linux-arm64-musl@2.1.1': + resolution: {integrity: sha512-/7FBLnTswu4jgV9ttI3AMIdDGqVEPIZd8I5u2D4tfCoj8rl9dnjrEQbAIDlWhUXdyWlFSz8JypH3swU9h9P+2A==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-arm64@1.9.4': - resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} + '@biomejs/cli-linux-arm64@2.1.1': + resolution: {integrity: sha512-tw4BEbhAUkWPe4WBr6IX04DJo+2jz5qpPzpW/SWvqMjb9QuHY8+J0M23V8EPY/zWU4IG8Ui0XESapR1CB49Q7g==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-x64-musl@1.9.4': - resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} + '@biomejs/cli-linux-x64-musl@2.1.1': + resolution: {integrity: sha512-kUu+loNI3OCD2c12cUt7M5yaaSjDnGIksZwKnueubX6c/HWUyi/0mPbTBHR49Me3F0KKjWiKM+ZOjsmC+lUt9g==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-linux-x64@1.9.4': - resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} + '@biomejs/cli-linux-x64@2.1.1': + resolution: {integrity: sha512-3WJ1GKjU7NzZb6RTbwLB59v9cTIlzjbiFLDB0z4376TkDqoNYilJaC37IomCr/aXwuU8QKkrYoHrgpSq5ffJ4Q==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-win32-arm64@1.9.4': - resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} + '@biomejs/cli-win32-arm64@2.1.1': + resolution: {integrity: sha512-vEHK0v0oW+E6RUWLoxb2isI3rZo57OX9ZNyyGH701fZPj6Il0Rn1f5DMNyCmyflMwTnIQstEbs7n2BxYSqQx4Q==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@1.9.4': - resolution: {integrity: sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==} + '@biomejs/cli-win32-x64@2.1.1': + resolution: {integrity: sha512-i2PKdn70kY++KEF/zkQFvQfX1e8SkA8hq4BgC+yE9dZqyLzB/XStY2MvwI3qswlRgnGpgncgqe0QYKVS1blksg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -7281,39 +7281,39 @@ snapshots: '@better-fetch/fetch@1.1.18': {} - '@biomejs/biome@1.9.4': + '@biomejs/biome@2.1.1': optionalDependencies: - '@biomejs/cli-darwin-arm64': 1.9.4 - '@biomejs/cli-darwin-x64': 1.9.4 - '@biomejs/cli-linux-arm64': 1.9.4 - '@biomejs/cli-linux-arm64-musl': 1.9.4 - '@biomejs/cli-linux-x64': 1.9.4 - '@biomejs/cli-linux-x64-musl': 1.9.4 - '@biomejs/cli-win32-arm64': 1.9.4 - '@biomejs/cli-win32-x64': 1.9.4 + '@biomejs/cli-darwin-arm64': 2.1.1 + '@biomejs/cli-darwin-x64': 2.1.1 + '@biomejs/cli-linux-arm64': 2.1.1 + '@biomejs/cli-linux-arm64-musl': 2.1.1 + '@biomejs/cli-linux-x64': 2.1.1 + '@biomejs/cli-linux-x64-musl': 2.1.1 + '@biomejs/cli-win32-arm64': 2.1.1 + '@biomejs/cli-win32-x64': 2.1.1 - '@biomejs/cli-darwin-arm64@1.9.4': + '@biomejs/cli-darwin-arm64@2.1.1': optional: true - '@biomejs/cli-darwin-x64@1.9.4': + '@biomejs/cli-darwin-x64@2.1.1': optional: true - '@biomejs/cli-linux-arm64-musl@1.9.4': + '@biomejs/cli-linux-arm64-musl@2.1.1': optional: true - '@biomejs/cli-linux-arm64@1.9.4': + '@biomejs/cli-linux-arm64@2.1.1': optional: true - '@biomejs/cli-linux-x64-musl@1.9.4': + '@biomejs/cli-linux-x64-musl@2.1.1': optional: true - '@biomejs/cli-linux-x64@1.9.4': + '@biomejs/cli-linux-x64@2.1.1': optional: true - '@biomejs/cli-win32-arm64@1.9.4': + '@biomejs/cli-win32-arm64@2.1.1': optional: true - '@biomejs/cli-win32-x64@1.9.4': + '@biomejs/cli-win32-x64@2.1.1': optional: true '@codemirror/autocomplete@6.18.6': From e92a8d7c981570ef5ba0941b7f708f8c9f3329ac Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 15:30:22 +0900 Subject: [PATCH 03/17] [autofix.ci] apply automated fixes --- apps/dokploy/components/layouts/side.tsx | 10 ++-------- apps/dokploy/package.json | 4 +++- apps/dokploy/types/chatwoot.d.ts | 5 +---- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/apps/dokploy/components/layouts/side.tsx b/apps/dokploy/components/layouts/side.tsx index 8d180967e..15390baf9 100644 --- a/apps/dokploy/components/layouts/side.tsx +++ b/apps/dokploy/components/layouts/side.tsx @@ -96,10 +96,7 @@ type SingleNavItem = { title: string; url: string; icon?: LucideIcon; - isEnabled?: (opts: { - auth?: AuthQueryOutput; - isCloud: boolean; - }) => boolean; + isEnabled?: (opts: { auth?: AuthQueryOutput; isCloud: boolean }) => boolean; }; // NavItem type @@ -125,10 +122,7 @@ type ExternalLink = { name: string; url: string; icon: React.ComponentType<{ className?: string }>; - isEnabled?: (opts: { - auth?: AuthQueryOutput; - isCloud: boolean; - }) => boolean; + isEnabled?: (opts: { auth?: AuthQueryOutput; isCloud: boolean }) => boolean; }; // Menu type diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json index c6d2a8e2c..fa273b88c 100644 --- a/apps/dokploy/package.json +++ b/apps/dokploy/package.json @@ -198,6 +198,8 @@ ] }, "commitlint": { - "extends": ["@commitlint/config-conventional"] + "extends": [ + "@commitlint/config-conventional" + ] } } diff --git a/apps/dokploy/types/chatwoot.d.ts b/apps/dokploy/types/chatwoot.d.ts index 88fa50f9b..f016645f8 100644 --- a/apps/dokploy/types/chatwoot.d.ts +++ b/apps/dokploy/types/chatwoot.d.ts @@ -13,10 +13,7 @@ declare global { baseDomain?: string; }; chatwootSDK?: { - run: (config: { - websiteToken: string; - baseUrl: string; - }) => void; + run: (config: { websiteToken: string; baseUrl: string }) => void; }; $chatwoot?: { setUser: ( From d4a3af475a77d6ca2bada99661559adec4014736 Mon Sep 17 00:00:00 2001 From: Marukome0743 Date: Mon, 14 Jul 2025 15:58:19 +0900 Subject: [PATCH 04/17] chore(package): version up pnpm to v9.12.0 --- apps/api/package.json | 6 +++++- apps/dokploy/package.json | 4 ++-- apps/schedules/package.json | 6 +++++- package.json | 4 ++-- packages/server/package.json | 7 ++++++- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/apps/api/package.json b/apps/api/package.json index 98fcea0d3..f0d22fedf 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -29,5 +29,9 @@ "tsx": "^4.16.2", "typescript": "^5.8.3" }, - "packageManager": "pnpm@9.5.0" + "packageManager": "pnpm@9.12.0", + "engines": { + "node": "^20.16.0", + "pnpm": ">=9.12.0" + } } diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json index c6d2a8e2c..6b8d89b61 100644 --- a/apps/dokploy/package.json +++ b/apps/dokploy/package.json @@ -187,10 +187,10 @@ "ct3aMetadata": { "initVersion": "7.25.2" }, - "packageManager": "pnpm@9.5.0", + "packageManager": "pnpm@9.12.0", "engines": { "node": "^20.16.0", - "pnpm": ">=9.5.0" + "pnpm": ">=9.12.0" }, "lint-staged": { "*": [ diff --git a/apps/schedules/package.json b/apps/schedules/package.json index c7823f112..a8c43dafb 100644 --- a/apps/schedules/package.json +++ b/apps/schedules/package.json @@ -29,5 +29,9 @@ "tsx": "^4.16.2", "typescript": "^5.8.3" }, - "packageManager": "pnpm@9.5.0" + "packageManager": "pnpm@9.12.0", + "engines": { + "node": "^20.16.0", + "pnpm": ">=9.12.0" + } } diff --git a/package.json b/package.json index f628e09fd..6a8b9cc09 100644 --- a/package.json +++ b/package.json @@ -30,10 +30,10 @@ "lint-staged": "^15.5.2", "tsx": "4.16.2" }, - "packageManager": "pnpm@9.5.0", + "packageManager": "pnpm@9.12.0", "engines": { "node": "^20.16.0", - "pnpm": ">=9.5.0" + "pnpm": ">=9.12.0" }, "lint-staged": { "*": [ diff --git a/packages/server/package.json b/packages/server/package.json index fcc4622d0..eeee8f831 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -105,5 +105,10 @@ "tsc-alias": "1.8.10", "tsx": "^4.16.2", "typescript": "^5.8.3" + }, + "packageManager": "pnpm@9.12.0", + "engines": { + "node": "^20.16.0", + "pnpm": ">=9.12.0" } -} \ No newline at end of file +} From 66bdf9bf0ae7fd50e0db9bbe8be0d3afb00b92c2 Mon Sep 17 00:00:00 2001 From: Marukome0743 Date: Mon, 14 Jul 2025 18:24:19 +0900 Subject: [PATCH 05/17] chore: remove `apps/monitoring` from `pnpm-workspace.yaml` --- pnpm-workspace.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 57838092e..4b3c22cb5 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,6 +1,5 @@ packages: - "apps/api" - "apps/dokploy" - - "apps/monitoring" - "apps/schedules" - "packages/server" From d0af517eb745e6862aec817a32b088db214b2c69 Mon Sep 17 00:00:00 2001 From: Marukome0743 Date: Mon, 14 Jul 2025 19:03:35 +0900 Subject: [PATCH 06/17] ci: remove custom branch and add workflow_dispatch event --- .github/workflows/deploy.yml | 3 ++- .github/workflows/dokploy.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bb7721468..3ed957b72 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,8 @@ name: Build Docker images on: push: - branches: ["canary", "main", "feat/monitoring"] + branches: [main, canary] + workflow_dispatch: jobs: build-and-push-cloud-image: diff --git a/.github/workflows/dokploy.yml b/.github/workflows/dokploy.yml index 0f65a50c9..afb4ba4d2 100644 --- a/.github/workflows/dokploy.yml +++ b/.github/workflows/dokploy.yml @@ -2,7 +2,8 @@ name: Dokploy Docker Build on: push: - branches: [main, canary, "1061-custom-docker-service-hostname"] + branches: [main, canary] + workflow_dispatch: env: IMAGE_NAME: dokploy/dokploy From 9ab937f726d61f2867ac0ec2a233343e82631d67 Mon Sep 17 00:00:00 2001 From: Marukome0743 Date: Tue, 15 Jul 2025 14:13:26 +0900 Subject: [PATCH 07/17] refactor: lint dokploy application --- .../deployments/show-deployments.tsx | 8 +++---- .../volume-backups/restore-volume-backups.tsx | 4 ++-- .../volume-backups/show-volume-backups.tsx | 2 +- .../compose/general/generic/show.tsx | 4 ++-- apps/dokploy/pages/api/deploy/github.ts | 6 ++--- .../services/application/[applicationId].tsx | 1 - .../services/compose/[composeId].tsx | 1 - apps/dokploy/server/api/root.ts | 4 ++-- apps/dokploy/server/api/routers/deployment.ts | 2 +- apps/dokploy/server/api/routers/docker.ts | 2 +- apps/dokploy/server/api/routers/mount.ts | 2 +- apps/dokploy/server/api/routers/swarm.ts | 4 ++-- .../server/api/routers/volume-backups.ts | 22 +++++++++---------- apps/dokploy/setup.ts | 2 +- 14 files changed, 31 insertions(+), 33 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/deployments/show-deployments.tsx b/apps/dokploy/components/dashboard/application/deployments/show-deployments.tsx index 04631b9b3..5790c129c 100644 --- a/apps/dokploy/components/dashboard/application/deployments/show-deployments.tsx +++ b/apps/dokploy/components/dashboard/application/deployments/show-deployments.tsx @@ -1,4 +1,5 @@ import { DateTooltip } from "@/components/shared/date-tooltip"; +import { DialogAction } from "@/components/shared/dialog-action"; import { StatusTooltip } from "@/components/shared/status-tooltip"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; @@ -10,14 +11,13 @@ import { CardTitle, } from "@/components/ui/card"; import { type RouterOutputs, api } from "@/utils/api"; -import { Clock, Loader2, RocketIcon, Settings, RefreshCcw } from "lucide-react"; +import { Clock, Loader2, RefreshCcw, RocketIcon, Settings } from "lucide-react"; import React, { useEffect, useState } from "react"; +import { toast } from "sonner"; +import { ShowRollbackSettings } from "../rollbacks/show-rollback-settings"; import { CancelQueues } from "./cancel-queues"; import { RefreshToken } from "./refresh-token"; import { ShowDeployment } from "./show-deployment"; -import { ShowRollbackSettings } from "../rollbacks/show-rollback-settings"; -import { DialogAction } from "@/components/shared/dialog-action"; -import { toast } from "sonner"; interface Props { id: string; diff --git a/apps/dokploy/components/dashboard/application/volume-backups/restore-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/restore-volume-backups.tsx index 5b13c61d7..b3baeb38f 100644 --- a/apps/dokploy/components/dashboard/application/volume-backups/restore-volume-backups.tsx +++ b/apps/dokploy/components/dashboard/application/volume-backups/restore-volume-backups.tsx @@ -1,3 +1,4 @@ +import { AlertBlock } from "@/components/shared/alert-block"; import { DrawerLogs } from "@/components/shared/drawer-logs"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; @@ -42,9 +43,8 @@ import { useState } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { z } from "zod"; -import { type LogLine, parseLogs } from "../../docker/logs/utils"; import { formatBytes } from "../../database/backups/restore-backup"; -import { AlertBlock } from "@/components/shared/alert-block"; +import { type LogLine, parseLogs } from "../../docker/logs/utils"; interface Props { id: string; diff --git a/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx index 083f45252..6d7895ee7 100644 --- a/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx +++ b/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx @@ -23,8 +23,8 @@ import { Trash2, } from "lucide-react"; import { toast } from "sonner"; -import { HandleVolumeBackups } from "./handle-volume-backups"; import { ShowDeploymentsModal } from "../deployments/show-deployments-modal"; +import { HandleVolumeBackups } from "./handle-volume-backups"; import { RestoreVolumeBackups } from "./restore-volume-backups"; interface Props { diff --git a/apps/dokploy/components/dashboard/compose/general/generic/show.tsx b/apps/dokploy/components/dashboard/compose/general/generic/show.tsx index 4ea1104bb..4a422a25a 100644 --- a/apps/dokploy/components/dashboard/compose/general/generic/show.tsx +++ b/apps/dokploy/components/dashboard/compose/general/generic/show.tsx @@ -1,3 +1,4 @@ +import { UnauthorizedGitProvider } from "@/components/dashboard/application/general/generic/unauthorized-git-provider"; import { BitbucketIcon, GitIcon, @@ -11,6 +12,7 @@ import { api } from "@/utils/api"; import { CodeIcon, GitBranch, Loader2 } from "lucide-react"; import Link from "next/link"; import { useState } from "react"; +import { toast } from "sonner"; import { ComposeFileEditor } from "../compose-file-editor"; import { ShowConvertedCompose } from "../show-converted-compose"; import { SaveBitbucketProviderCompose } from "./save-bitbucket-provider-compose"; @@ -18,8 +20,6 @@ import { SaveGitProviderCompose } from "./save-git-provider-compose"; import { SaveGiteaProviderCompose } from "./save-gitea-provider-compose"; import { SaveGithubProviderCompose } from "./save-github-provider-compose"; import { SaveGitlabProviderCompose } from "./save-gitlab-provider-compose"; -import { UnauthorizedGitProvider } from "@/components/dashboard/application/general/generic/unauthorized-git-provider"; -import { toast } from "sonner"; type TabState = "github" | "git" | "raw" | "gitlab" | "bitbucket" | "gitea"; interface Props { diff --git a/apps/dokploy/pages/api/deploy/github.ts b/apps/dokploy/pages/api/deploy/github.ts index 325b4f1be..d2787ff28 100644 --- a/apps/dokploy/pages/api/deploy/github.ts +++ b/apps/dokploy/pages/api/deploy/github.ts @@ -5,14 +5,14 @@ import { myQueue } from "@/server/queues/queueSetup"; import { deploy } from "@/server/utils/deploy"; import { IS_CLOUD, + checkUserRepositoryPermissions, createPreviewDeployment, + createSecurityBlockedComment, + findGithubById, findPreviewDeploymentByApplicationId, findPreviewDeploymentsByPullRequestId, removePreviewDeployment, shouldDeploy, - findGithubById, - checkUserRepositoryPermissions, - createSecurityBlockedComment, } from "@dokploy/server"; import { Webhooks } from "@octokit/webhooks"; import { and, eq } from "drizzle-orm"; diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx index 2eb31b445..664536bb1 100644 --- a/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx +++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx @@ -37,7 +37,6 @@ import { TooltipProvider, TooltipTrigger, } from "@/components/ui/tooltip"; -import { cn } from "@/lib/utils"; import { appRouter } from "@/server/api/root"; import { api } from "@/utils/api"; import { validateRequest } from "@dokploy/server/lib/auth"; diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx index f7e793a64..dd5383697 100644 --- a/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx +++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx @@ -33,7 +33,6 @@ import { TooltipProvider, TooltipTrigger, } from "@/components/ui/tooltip"; -import { cn } from "@/lib/utils"; import { appRouter } from "@/server/api/root"; import { api } from "@/utils/api"; import { validateRequest } from "@dokploy/server/lib/auth"; diff --git a/apps/dokploy/server/api/root.ts b/apps/dokploy/server/api/root.ts index 5b6de7344..e930f2264 100644 --- a/apps/dokploy/server/api/root.ts +++ b/apps/dokploy/server/api/root.ts @@ -28,6 +28,8 @@ import { projectRouter } from "./routers/project"; import { redirectsRouter } from "./routers/redirects"; import { redisRouter } from "./routers/redis"; import { registryRouter } from "./routers/registry"; +import { rollbackRouter } from "./routers/rollbacks"; +import { scheduleRouter } from "./routers/schedule"; import { securityRouter } from "./routers/security"; import { serverRouter } from "./routers/server"; import { settingsRouter } from "./routers/settings"; @@ -35,8 +37,6 @@ import { sshRouter } from "./routers/ssh-key"; import { stripeRouter } from "./routers/stripe"; import { swarmRouter } from "./routers/swarm"; import { userRouter } from "./routers/user"; -import { scheduleRouter } from "./routers/schedule"; -import { rollbackRouter } from "./routers/rollbacks"; import { volumeBackupsRouter } from "./routers/volume-backups"; /** * This is the primary router for your server. diff --git a/apps/dokploy/server/api/routers/deployment.ts b/apps/dokploy/server/api/routers/deployment.ts index e3e73216b..015fd6c3f 100644 --- a/apps/dokploy/server/api/routers/deployment.ts +++ b/apps/dokploy/server/api/routers/deployment.ts @@ -20,8 +20,8 @@ import { } from "@dokploy/server"; import { TRPCError } from "@trpc/server"; import { desc, eq } from "drizzle-orm"; -import { createTRPCRouter, protectedProcedure } from "../trpc"; import { z } from "zod"; +import { createTRPCRouter, protectedProcedure } from "../trpc"; export const deploymentRouter = createTRPCRouter({ all: protectedProcedure diff --git a/apps/dokploy/server/api/routers/docker.ts b/apps/dokploy/server/api/routers/docker.ts index 72dbb40a9..cc75f4852 100644 --- a/apps/dokploy/server/api/routers/docker.ts +++ b/apps/dokploy/server/api/routers/docker.ts @@ -8,9 +8,9 @@ import { getServiceContainersByAppName, getStackContainersByAppName, } from "@dokploy/server"; +import { TRPCError } from "@trpc/server"; import { z } from "zod"; import { createTRPCRouter, protectedProcedure } from "../trpc"; -import { TRPCError } from "@trpc/server"; export const containerIdRegex = /^[a-zA-Z0-9.\-_]+$/; diff --git a/apps/dokploy/server/api/routers/mount.ts b/apps/dokploy/server/api/routers/mount.ts index 7add3ab16..3947a4cf1 100644 --- a/apps/dokploy/server/api/routers/mount.ts +++ b/apps/dokploy/server/api/routers/mount.ts @@ -12,8 +12,8 @@ import { getServiceContainer, updateMount, } from "@dokploy/server"; -import { createTRPCRouter, protectedProcedure } from "../trpc"; import { z } from "zod"; +import { createTRPCRouter, protectedProcedure } from "../trpc"; export const mountRouter = createTRPCRouter({ create: protectedProcedure diff --git a/apps/dokploy/server/api/routers/swarm.ts b/apps/dokploy/server/api/routers/swarm.ts index 735ddf96e..997eba310 100644 --- a/apps/dokploy/server/api/routers/swarm.ts +++ b/apps/dokploy/server/api/routers/swarm.ts @@ -4,10 +4,10 @@ import { getNodeInfo, getSwarmNodes, } from "@dokploy/server"; +import { findServerById } from "@dokploy/server"; +import { TRPCError } from "@trpc/server"; import { z } from "zod"; import { createTRPCRouter, protectedProcedure } from "../trpc"; -import { TRPCError } from "@trpc/server"; -import { findServerById } from "@dokploy/server"; import { containerIdRegex } from "./docker"; export const swarmRouter = createTRPCRouter({ diff --git a/apps/dokploy/server/api/routers/volume-backups.ts b/apps/dokploy/server/api/routers/volume-backups.ts index 47e7cb6ec..20bdee023 100644 --- a/apps/dokploy/server/api/routers/volume-backups.ts +++ b/apps/dokploy/server/api/routers/volume-backups.ts @@ -1,30 +1,30 @@ +import { removeJob, schedule, updateJob } from "@/server/utils/backup"; import { IS_CLOUD, - updateVolumeBackup, - removeVolumeBackup, createVolumeBackup, - runVolumeBackup, findVolumeBackupById, - restoreVolume, - scheduleVolumeBackup, + removeVolumeBackup, removeVolumeBackupJob, + restoreVolume, + runVolumeBackup, + scheduleVolumeBackup, + updateVolumeBackup, } from "@dokploy/server"; +import { db } from "@dokploy/server/db"; import { createVolumeBackupSchema, updateVolumeBackupSchema, volumeBackups, } from "@dokploy/server/db/schema"; -import { z } from "zod"; -import { createTRPCRouter, protectedProcedure } from "../trpc"; -import { db } from "@dokploy/server/db"; -import { eq } from "drizzle-orm"; -import { observable } from "@trpc/server/observable"; import { execAsyncRemote, execAsyncStream, } from "@dokploy/server/utils/process/execAsync"; -import { removeJob, schedule, updateJob } from "@/server/utils/backup"; import { TRPCError } from "@trpc/server"; +import { observable } from "@trpc/server/observable"; +import { eq } from "drizzle-orm"; +import { z } from "zod"; +import { createTRPCRouter, protectedProcedure } from "../trpc"; export const volumeBackupsRouter = createTRPCRouter({ list: protectedProcedure diff --git a/apps/dokploy/setup.ts b/apps/dokploy/setup.ts index f7fe34106..5d767c7fd 100644 --- a/apps/dokploy/setup.ts +++ b/apps/dokploy/setup.ts @@ -5,6 +5,7 @@ import { initializeTraefik, } from "@dokploy/server/setup/traefik-setup"; +import { execAsync } from "@dokploy/server"; import { setupDirectories } from "@dokploy/server/setup/config-paths"; import { initializePostgres } from "@dokploy/server/setup/postgres-setup"; import { initializeRedis } from "@dokploy/server/setup/redis-setup"; @@ -12,7 +13,6 @@ import { initializeNetwork, initializeSwarm, } from "@dokploy/server/setup/setup"; -import { execAsync } from "@dokploy/server"; (async () => { try { setupDirectories(); From cadea7ff28247a311aa424f07b116343de9de7d8 Mon Sep 17 00:00:00 2001 From: Marukome0743 Date: Tue, 15 Jul 2025 14:22:37 +0900 Subject: [PATCH 08/17] refactor: lint and sort imports on dokploy/server --- packages/server/src/db/schema/deployment.ts | 2 +- packages/server/src/db/schema/rollbacks.ts | 10 +++++----- packages/server/src/db/schema/user.ts | 2 +- .../server/src/db/schema/volume-backups.ts | 14 ++++++------- packages/server/src/services/deployment.ts | 2 +- packages/server/src/services/rollbacks.ts | 20 +++++++++---------- .../server/src/services/volume-backups.ts | 6 +++--- packages/server/src/utils/docker/collision.ts | 2 +- .../server/src/utils/traefik/application.ts | 2 +- .../server/src/utils/traefik/middleware.ts | 2 +- .../server/src/utils/volume-backups/backup.ts | 6 +++--- .../src/utils/volume-backups/restore.ts | 2 +- .../server/src/utils/volume-backups/utils.ts | 2 +- 13 files changed, 36 insertions(+), 36 deletions(-) diff --git a/packages/server/src/db/schema/deployment.ts b/packages/server/src/db/schema/deployment.ts index fc2da4cb6..ce1ff2159 100644 --- a/packages/server/src/db/schema/deployment.ts +++ b/packages/server/src/db/schema/deployment.ts @@ -13,9 +13,9 @@ import { applications } from "./application"; import { backups } from "./backups"; import { compose } from "./compose"; import { previewDeployments } from "./preview-deployments"; +import { rollbacks } from "./rollbacks"; import { schedules } from "./schedule"; import { server } from "./server"; -import { rollbacks } from "./rollbacks"; import { volumeBackups } from "./volume-backups"; export const deploymentStatus = pgEnum("deploymentStatus", [ "running", diff --git a/packages/server/src/db/schema/rollbacks.ts b/packages/server/src/db/schema/rollbacks.ts index 4947b19c2..92690dd93 100644 --- a/packages/server/src/db/schema/rollbacks.ts +++ b/packages/server/src/db/schema/rollbacks.ts @@ -1,14 +1,14 @@ +import type { Application } from "@dokploy/server/services/application"; +import type { Mount } from "@dokploy/server/services/mount"; +import type { Port } from "@dokploy/server/services/port"; +import type { Project } from "@dokploy/server/services/project"; +import type { Registry } from "@dokploy/server/services/registry"; import { relations } from "drizzle-orm"; import { jsonb, pgTable, serial, text } from "drizzle-orm/pg-core"; import { createInsertSchema } from "drizzle-zod"; import { nanoid } from "nanoid"; import { z } from "zod"; import { deployments } from "./deployment"; -import type { Application } from "@dokploy/server/services/application"; -import type { Project } from "@dokploy/server/services/project"; -import type { Mount } from "@dokploy/server/services/mount"; -import type { Port } from "@dokploy/server/services/port"; -import type { Registry } from "@dokploy/server/services/registry"; export const rollbacks = pgTable("rollback", { rollbackId: text("rollbackId") diff --git a/packages/server/src/db/schema/user.ts b/packages/server/src/db/schema/user.ts index 8f4de12eb..d1620ef16 100644 --- a/packages/server/src/db/schema/user.ts +++ b/packages/server/src/db/schema/user.ts @@ -1,3 +1,4 @@ +import { paths } from "@dokploy/server/constants"; import { relations } from "drizzle-orm"; import { boolean, @@ -15,7 +16,6 @@ import { backups } from "./backups"; import { projects } from "./project"; import { schedules } from "./schedule"; import { certificateType } from "./shared"; -import { paths } from "@dokploy/server/constants"; /** * This is an example of how to use the multi-project schema feature of Drizzle ORM. Use the same * database instance for multiple projects. diff --git a/packages/server/src/db/schema/volume-backups.ts b/packages/server/src/db/schema/volume-backups.ts index 69ab62ca2..0c6520069 100644 --- a/packages/server/src/db/schema/volume-backups.ts +++ b/packages/server/src/db/schema/volume-backups.ts @@ -3,16 +3,16 @@ import { boolean, integer, pgTable, text } from "drizzle-orm/pg-core"; import { createInsertSchema } from "drizzle-zod"; import { nanoid } from "nanoid"; import { z } from "zod"; -import { serviceType } from "./mount"; import { applications } from "./application"; -import { mongo } from "./mongo"; -import { mysql } from "./mysql"; -import { redis } from "./redis"; import { compose } from "./compose"; -import { postgres } from "./postgres"; -import { mariadb } from "./mariadb"; -import { destinations } from "./destination"; import { deployments } from "./deployment"; +import { destinations } from "./destination"; +import { mariadb } from "./mariadb"; +import { mongo } from "./mongo"; +import { serviceType } from "./mount"; +import { mysql } from "./mysql"; +import { postgres } from "./postgres"; +import { redis } from "./redis"; import { generateAppName } from "./utils"; export const volumeBackups = pgTable("volume_backup", { diff --git a/packages/server/src/services/deployment.ts b/packages/server/src/services/deployment.ts index 12fdff5b9..c242fef95 100644 --- a/packages/server/src/services/deployment.ts +++ b/packages/server/src/services/deployment.ts @@ -31,8 +31,8 @@ import { findPreviewDeploymentById, updatePreviewDeployment, } from "./preview-deployment"; -import { findScheduleById } from "./schedule"; import { removeRollbackById } from "./rollbacks"; +import { findScheduleById } from "./schedule"; import { findVolumeBackupById } from "./volume-backups"; export type Deployment = typeof deployments.$inferSelect; diff --git a/packages/server/src/services/rollbacks.ts b/packages/server/src/services/rollbacks.ts index 88ee24a6d..3e96325a6 100644 --- a/packages/server/src/services/rollbacks.ts +++ b/packages/server/src/services/rollbacks.ts @@ -1,27 +1,27 @@ +import type { CreateServiceOptions } from "dockerode"; import { eq } from "drizzle-orm"; +import type { z } from "zod"; import { db } from "../db"; import { type createRollbackSchema, - rollbacks, deployments as deploymentsSchema, + rollbacks, } from "../db/schema"; -import type { z } from "zod"; -import { type Application, findApplicationById } from "./application"; -import { getRemoteDocker } from "../utils/servers/remote-docker"; -import { getAuthConfig, type ApplicationNested } from "../utils/builders"; -import { execAsync, execAsyncRemote } from "../utils/process/execAsync"; -import type { CreateServiceOptions } from "dockerode"; -import { findDeploymentById } from "./deployment"; +import { type ApplicationNested, getAuthConfig } from "../utils/builders"; import { - prepareEnvironmentVariables, calculateResources, generateBindMounts, generateConfigContainer, generateVolumeMounts, + prepareEnvironmentVariables, } from "../utils/docker/utils"; -import type { Project } from "./project"; +import { execAsync, execAsyncRemote } from "../utils/process/execAsync"; +import { getRemoteDocker } from "../utils/servers/remote-docker"; +import { type Application, findApplicationById } from "./application"; +import { findDeploymentById } from "./deployment"; import type { Mount } from "./mount"; import type { Port } from "./port"; +import type { Project } from "./project"; export const createRollback = async ( input: z.infer, diff --git a/packages/server/src/services/volume-backups.ts b/packages/server/src/services/volume-backups.ts index 1b50e1465..180a01bb7 100644 --- a/packages/server/src/services/volume-backups.ts +++ b/packages/server/src/services/volume-backups.ts @@ -1,12 +1,12 @@ +import { TRPCError } from "@trpc/server"; import { eq } from "drizzle-orm"; +import type { z } from "zod"; +import { db } from "../db"; import { type createVolumeBackupSchema, type updateVolumeBackupSchema, volumeBackups, } from "../db/schema"; -import { db } from "../db"; -import { TRPCError } from "@trpc/server"; -import type { z } from "zod"; export const findVolumeBackupById = async (volumeBackupId: string) => { const volumeBackup = await db.query.volumeBackups.findFirst({ diff --git a/packages/server/src/utils/docker/collision.ts b/packages/server/src/utils/docker/collision.ts index 1ef6a979c..9d399dc0d 100644 --- a/packages/server/src/utils/docker/collision.ts +++ b/packages/server/src/utils/docker/collision.ts @@ -1,8 +1,8 @@ import { findComposeById } from "@dokploy/server/services/compose"; import { dump, load } from "js-yaml"; import { addAppNameToAllServiceNames } from "./collision/root-network"; -import { addSuffixToAllVolumes } from "./compose/volume"; import { generateRandomHash } from "./compose"; +import { addSuffixToAllVolumes } from "./compose/volume"; import type { ComposeSpecification } from "./types"; export const addAppNameToPreventCollision = ( diff --git a/packages/server/src/utils/traefik/application.ts b/packages/server/src/utils/traefik/application.ts index 8e7ca574b..7af855117 100644 --- a/packages/server/src/utils/traefik/application.ts +++ b/packages/server/src/utils/traefik/application.ts @@ -1,6 +1,6 @@ import fs, { writeFileSync } from "node:fs"; -import path from "node:path"; import { createReadStream } from "node:fs"; +import path from "node:path"; import { createInterface } from "node:readline"; import { paths } from "@dokploy/server/constants"; import type { Domain } from "@dokploy/server/services/domain"; diff --git a/packages/server/src/utils/traefik/middleware.ts b/packages/server/src/utils/traefik/middleware.ts index 3862b9e8b..1254e1f51 100644 --- a/packages/server/src/utils/traefik/middleware.ts +++ b/packages/server/src/utils/traefik/middleware.ts @@ -1,12 +1,12 @@ import { existsSync, readFileSync, writeFileSync } from "node:fs"; import { join } from "node:path"; import { paths } from "@dokploy/server/constants"; +import type { Domain } from "@dokploy/server/services/domain"; import { dump, load } from "js-yaml"; import type { ApplicationNested } from "../builders"; import { execAsyncRemote } from "../process/execAsync"; import { writeTraefikConfigRemote } from "./application"; import type { FileConfig } from "./file-types"; -import type { Domain } from "@dokploy/server/services/domain"; export const addMiddleware = (config: FileConfig, middlewareName: string) => { if (config.http?.routers) { diff --git a/packages/server/src/utils/volume-backups/backup.ts b/packages/server/src/utils/volume-backups/backup.ts index 46a15657f..3b074f998 100644 --- a/packages/server/src/utils/volume-backups/backup.ts +++ b/packages/server/src/utils/volume-backups/backup.ts @@ -1,9 +1,9 @@ -import type { findVolumeBackupById } from "@dokploy/server/services/volume-backups"; -import { normalizeS3Path } from "../backups/utils"; -import { getS3Credentials } from "../backups/utils"; import path from "node:path"; import { paths } from "@dokploy/server/constants"; import { findComposeById } from "@dokploy/server/services/compose"; +import type { findVolumeBackupById } from "@dokploy/server/services/volume-backups"; +import { normalizeS3Path } from "../backups/utils"; +import { getS3Credentials } from "../backups/utils"; export const backupVolume = async ( volumeBackup: Awaited>, diff --git a/packages/server/src/utils/volume-backups/restore.ts b/packages/server/src/utils/volume-backups/restore.ts index b30e585ea..6f6068caf 100644 --- a/packages/server/src/utils/volume-backups/restore.ts +++ b/packages/server/src/utils/volume-backups/restore.ts @@ -1,3 +1,4 @@ +import path from "node:path"; import { findApplicationById, findComposeById, @@ -5,7 +6,6 @@ import { getS3Credentials, paths, } from "../.."; -import path from "node:path"; export const restoreVolume = async ( id: string, diff --git a/packages/server/src/utils/volume-backups/utils.ts b/packages/server/src/utils/volume-backups/utils.ts index 69affad34..63e5a716a 100644 --- a/packages/server/src/utils/volume-backups/utils.ts +++ b/packages/server/src/utils/volume-backups/utils.ts @@ -1,4 +1,5 @@ import { findVolumeBackupById } from "@dokploy/server/services/volume-backups"; +import { scheduleJob, scheduledJobs } from "node-schedule"; import { createDeploymentVolumeBackup, execAsync, @@ -6,7 +7,6 @@ import { updateDeploymentStatus, } from "../.."; import { backupVolume } from "./backup"; -import { scheduleJob, scheduledJobs } from "node-schedule"; export const scheduleVolumeBackup = async (volumeBackupId: string) => { const volumeBackup = await findVolumeBackupById(volumeBackupId); From aaa205f104171385abca65d77e536950f02fd7f7 Mon Sep 17 00:00:00 2001 From: Vyacheslav Scherbinin Date: Wed, 16 Jul 2025 12:29:31 +0700 Subject: [PATCH 09/17] feat(conf): disable sendAnonymousUsage --- packages/server/src/setup/traefik-setup.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/server/src/setup/traefik-setup.ts b/packages/server/src/setup/traefik-setup.ts index 1f8ee6661..e0c5911af 100644 --- a/packages/server/src/setup/traefik-setup.ts +++ b/packages/server/src/setup/traefik-setup.ts @@ -191,6 +191,9 @@ export const createDefaultServerTraefikConfig = () => { export const getDefaultTraefikConfig = () => { const configObject: MainTraefikConfig = { + global: { + sendAnonymousUsage: false, + }, providers: { ...(process.env.NODE_ENV === "development" ? { From a67c3eb979b44f9eb2c879895155a019d66278ba Mon Sep 17 00:00:00 2001 From: Vyacheslav Scherbinin Date: Wed, 16 Jul 2025 12:31:30 +0700 Subject: [PATCH 10/17] feat(conf): accessLog filePath --- packages/server/src/setup/traefik-setup.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/server/src/setup/traefik-setup.ts b/packages/server/src/setup/traefik-setup.ts index e0c5911af..cde5e3355 100644 --- a/packages/server/src/setup/traefik-setup.ts +++ b/packages/server/src/setup/traefik-setup.ts @@ -191,9 +191,12 @@ export const createDefaultServerTraefikConfig = () => { export const getDefaultTraefikConfig = () => { const configObject: MainTraefikConfig = { - global: { - sendAnonymousUsage: false, - }, + global: { + sendAnonymousUsage: false, + }, + accessLog: { + filePath: "/etc/dokploy/traefik/dynamic/access.log", + }, providers: { ...(process.env.NODE_ENV === "development" ? { From f3856722dab7c8aeb863f1de99d09e989e83c069 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 20 Jul 2025 18:45:18 -0600 Subject: [PATCH 11/17] feat(project): add refreshToken to application and compose data retrieval - Included refreshToken in the data returned from findApplicationById and findComposeById functions to enhance application state management. --- apps/dokploy/server/api/routers/project.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/dokploy/server/api/routers/project.ts b/apps/dokploy/server/api/routers/project.ts index 5744a103e..0502273e9 100644 --- a/apps/dokploy/server/api/routers/project.ts +++ b/apps/dokploy/server/api/routers/project.ts @@ -361,6 +361,7 @@ export const projectRouter = createTRPCRouter({ previewDeployments, mounts, appName, + refreshToken, ...application } = await findApplicationById(id); const newAppName = appName.substring( @@ -603,8 +604,14 @@ export const projectRouter = createTRPCRouter({ break; } case "compose": { - const { composeId, mounts, domains, appName, ...compose } = - await findComposeById(id); + const { + composeId, + mounts, + domains, + appName, + refreshToken, + ...compose + } = await findComposeById(id); const newAppName = appName.substring( 0, From 658a4a9b99d477a88b0d29d9fe11da379a8e4bba Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 20 Jul 2025 18:54:57 -0600 Subject: [PATCH 12/17] refactor(auth): simplify user session structure in validateRequest function - Changed user object in mockSession to only include userId, removing email and name for a more streamlined session representation. --- packages/server/src/lib/auth.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/server/src/lib/auth.ts b/packages/server/src/lib/auth.ts index 64ef726ab..464aa9139 100644 --- a/packages/server/src/lib/auth.ts +++ b/packages/server/src/lib/auth.ts @@ -298,11 +298,7 @@ export const validateRequest = async (request: IncomingMessage) => { const mockSession = { session: { - user: { - id: apiKeyRecord.user.id, - email: apiKeyRecord.user.email, - name: apiKeyRecord.user.name, - }, + userId: apiKeyRecord.user.id, activeOrganizationId: organizationId || "", }, user: { From a36ab65aa61ee16d3982c58464b1e1321bfc91da Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 20 Jul 2025 18:56:35 -0600 Subject: [PATCH 13/17] fix(dashboard): disable refetch on window focus for destination handling --- .../dashboard/settings/destination/handle-destinations.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/dokploy/components/dashboard/settings/destination/handle-destinations.tsx b/apps/dokploy/components/dashboard/settings/destination/handle-destinations.tsx index 40bcfa24e..861d7d112 100644 --- a/apps/dokploy/components/dashboard/settings/destination/handle-destinations.tsx +++ b/apps/dokploy/components/dashboard/settings/destination/handle-destinations.tsx @@ -70,6 +70,7 @@ export const HandleDestinations = ({ destinationId }: Props) => { }, { enabled: !!destinationId, + refetchOnWindowFocus: false, }, ); const { From 9b89b4631f44a39dc0d6ab3c2c0507cc8160439e Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 20 Jul 2025 19:01:20 -0600 Subject: [PATCH 14/17] fix(dashboard): update Docker cleanup toggle logic to prioritize server settings --- .../settings/servers/actions/toggle-docker-cleanup.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx b/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx index 604ab6ce0..6cd382926 100644 --- a/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx @@ -20,7 +20,9 @@ export const ToggleDockerCleanup = ({ serverId }: Props) => { }, ); - const enabled = data?.user.enableDockerCleanup || server?.enableDockerCleanup; + const enabled = serverId + ? server?.enableDockerCleanup + : data?.user.enableDockerCleanup; const { mutateAsync } = api.settings.updateDockerCleanup.useMutation(); From 98ddd096e5aa72c770a3b5d1ebf3ff03c692f8b8 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 20 Jul 2025 19:45:41 -0600 Subject: [PATCH 15/17] Update packages/server/src/setup/traefik-setup.ts --- packages/server/src/setup/traefik-setup.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/server/src/setup/traefik-setup.ts b/packages/server/src/setup/traefik-setup.ts index cde5e3355..8d7097e65 100644 --- a/packages/server/src/setup/traefik-setup.ts +++ b/packages/server/src/setup/traefik-setup.ts @@ -194,9 +194,6 @@ export const getDefaultTraefikConfig = () => { global: { sendAnonymousUsage: false, }, - accessLog: { - filePath: "/etc/dokploy/traefik/dynamic/access.log", - }, providers: { ...(process.env.NODE_ENV === "development" ? { From 288d86c73b318236b869dec4ccc77837684f7bbf Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 20 Jul 2025 20:05:30 -0600 Subject: [PATCH 16/17] fix(traefik): remove duplicate file write operation in writeTraefikConfigInPath function --- packages/server/src/utils/traefik/application.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/server/src/utils/traefik/application.ts b/packages/server/src/utils/traefik/application.ts index 7af855117..5da84a18e 100644 --- a/packages/server/src/utils/traefik/application.ts +++ b/packages/server/src/utils/traefik/application.ts @@ -237,7 +237,6 @@ export const writeTraefikConfigInPath = async ( } else { fs.writeFileSync(configPath, traefikConfig, "utf8"); } - fs.writeFileSync(configPath, traefikConfig, "utf8"); } catch (e) { console.error("Error saving the YAML config file:", e); } From b95dfed8fc49cb916cd42d1ca87884963ba475c3 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 20 Jul 2025 20:06:47 -0600 Subject: [PATCH 17/17] chore(package): bump version to v0.24.4 --- 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 9bb112764..ec1219500 100644 --- a/apps/dokploy/package.json +++ b/apps/dokploy/package.json @@ -1,6 +1,6 @@ { "name": "dokploy", - "version": "v0.24.3", + "version": "v0.24.4", "private": true, "license": "Apache-2.0", "type": "module",