From d08fdeb939101a94512f2f7d572ce37a9aee2ba2 Mon Sep 17 00:00:00 2001 From: Bima42 Date: Tue, 18 Nov 2025 19:47:29 +0100 Subject: [PATCH] fix: only upgrade those that use default pg path --- apps/dokploy/server/api/routers/postgres.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/dokploy/server/api/routers/postgres.ts b/apps/dokploy/server/api/routers/postgres.ts index 9eb7f3af5..67faed6c6 100644 --- a/apps/dokploy/server/api/routers/postgres.ts +++ b/apps/dokploy/server/api/routers/postgres.ts @@ -42,9 +42,7 @@ import { cancelJobs } from "@/server/utils/backup"; function getMountPath(dockerImage: string): string { const versionMatch = dockerImage.match(/postgres:(\d+)/); - const version = versionMatch?.[1] - ? Number.parseInt(versionMatch[1], 10) - : 18; + const version = versionMatch?.[1] ? Number.parseInt(versionMatch[1], 10) : 18; return `/var/lib/postgresql/${version}/data`; } @@ -388,9 +386,11 @@ export const postgresRouter = createTRPCRouter({ }); } for (const mount of mounts) { - await updateMount(mount.mountId, { - mountPath: mountPath, - }); + if (mount.mountPath.startsWith("/var/lib/postgresql")) { + await updateMount(mount.mountId, { + mountPath: mountPath, + }); + } } }