mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
fix: avoid database connection during setup by using native exec
The setup.ts script imports execAsync from @dokploy/server, which triggers the entire package to load including lib/auth.ts. This module initializes betterAuth() with a database connection at import time, causing the setup script to fail with ECONNREFUSED before the database container is created. This fix replaces the import with Node.js native promisify(exec), avoiding the module side-effect that attempts database connection during setup.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { exit } from "node:process";
|
||||
import { execAsync } from "@dokploy/server";
|
||||
import { exec } from "node:child_process";
|
||||
import { promisify } from "node:util";
|
||||
|
||||
const execAsync = promisify(exec);
|
||||
import { setupDirectories } from "@dokploy/server/setup/config-paths";
|
||||
import { initializePostgres } from "@dokploy/server/setup/postgres-setup";
|
||||
import { initializeRedis } from "@dokploy/server/setup/redis-setup";
|
||||
|
||||
Reference in New Issue
Block a user