MCPcopy
hub / github.com/Dokploy/dokploy / getMountPath

Function getMountPath

packages/server/src/services/postgres.ts:17–28  ·  view source on GitHub ↗
(dockerImage: string)

Source from the content-addressed store, hash-verified

15import { validUniqueServerAppName } from "./project";
16
17export function getMountPath(dockerImage: string): string {
18 const versionMatch = dockerImage.match(/postgres:(\d+)/);
19
20 if (versionMatch?.[1]) {
21 const version = Number.parseInt(versionMatch[1], 10);
22 if (version >= 18) {
23 // PostgreSQL 18+ uses /var/lib/postgresql/{version}/docker as the default PGDATA
24 return `/var/lib/postgresql/${version}/docker`;
25 }
26 }
27 return "/var/lib/postgresql/data";
28}
29
30export type Postgres = typeof postgres.$inferSelect;
31

Callers 1

postgres.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected