mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-03 21:15:23 +02:00
feat(dokploy): add wait-for-postgres script and update Dockerfile and package.json
- Introduced a new script to wait for PostgreSQL to be ready before starting the application. - Updated the Dockerfile to include a health check for the application. - Modified the start script in package.json to run the wait-for-postgres script prior to starting the server and migration processes. - Added the wait-for-postgres TypeScript file to handle connection retries to the PostgreSQL database.
This commit is contained in:
@@ -764,16 +764,13 @@ export const settingsRouter = createTRPCRouter({
|
||||
return haveServers.length > 0 || haveProjects.length > 0;
|
||||
}),
|
||||
health: publicProcedure.query(async () => {
|
||||
if (IS_CLOUD) {
|
||||
try {
|
||||
await db.execute(sql`SELECT 1`);
|
||||
return { status: "ok" };
|
||||
} catch (error) {
|
||||
console.error("Database connection error:", error);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
await db.execute(sql`SELECT 1`);
|
||||
return { status: "ok" };
|
||||
} catch (error) {
|
||||
console.error("Database connection error:", error);
|
||||
throw error;
|
||||
}
|
||||
return { status: "not_cloud" };
|
||||
}),
|
||||
setupGPU: adminProcedure
|
||||
.input(
|
||||
|
||||
Reference in New Issue
Block a user