diff --git a/packages/server/src/db/constants.ts b/packages/server/src/db/constants.ts index e520235f9..e5172740b 100644 --- a/packages/server/src/db/constants.ts +++ b/packages/server/src/db/constants.ts @@ -34,7 +34,12 @@ if (DATABASE_URL) { Please migrate to Docker Secrets using POSTGRES_PASSWORD_FILE. Please execute this command in your server: curl -sSL https://dokploy.com/security/0.26.6.sh | bash `); - // postgres://dokploy:amukds4wi9001583845717ad2@localhost:5432/dokploy - dbUrl = - "postgres://dokploy:amukds4wi9001583845717ad2@dokploy-postgres:5432/dokploy"; + + if (process.env.NODE_ENV === "production") { + dbUrl = + "postgres://dokploy:amukds4wi9001583845717ad2@dokploy-postgres:5432/dokploy"; + } else { + dbUrl = + "postgres://dokploy:amukds4wi9001583845717ad2@localhost:5432/dokploy"; + } }