mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-09 13:35:19 +00:00
fix: only upgrade those that use default pg path
This commit is contained in:
@@ -42,9 +42,7 @@ import { cancelJobs } from "@/server/utils/backup";
|
|||||||
|
|
||||||
function getMountPath(dockerImage: string): string {
|
function getMountPath(dockerImage: string): string {
|
||||||
const versionMatch = dockerImage.match(/postgres:(\d+)/);
|
const versionMatch = dockerImage.match(/postgres:(\d+)/);
|
||||||
const version = versionMatch?.[1]
|
const version = versionMatch?.[1] ? Number.parseInt(versionMatch[1], 10) : 18;
|
||||||
? Number.parseInt(versionMatch[1], 10)
|
|
||||||
: 18;
|
|
||||||
|
|
||||||
return `/var/lib/postgresql/${version}/data`;
|
return `/var/lib/postgresql/${version}/data`;
|
||||||
}
|
}
|
||||||
@@ -388,9 +386,11 @@ export const postgresRouter = createTRPCRouter({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
for (const mount of mounts) {
|
for (const mount of mounts) {
|
||||||
await updateMount(mount.mountId, {
|
if (mount.mountPath.startsWith("/var/lib/postgresql")) {
|
||||||
mountPath: mountPath,
|
await updateMount(mount.mountId, {
|
||||||
});
|
mountPath: mountPath,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user