From e9fd280fa27caa4330a2a2c7ddb39e18fe651748 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 23 Mar 2025 23:28:53 -0600 Subject: [PATCH 1/3] refactor(server): comment out initialization of Postgres, Traefik, and Redis for testing purposes --- apps/dokploy/server/server.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/dokploy/server/server.ts b/apps/dokploy/server/server.ts index c8f53f6f9..4f5f0dc8b 100644 --- a/apps/dokploy/server/server.ts +++ b/apps/dokploy/server/server.ts @@ -49,14 +49,14 @@ void app.prepare().then(async () => { await initializeNetwork(); createDefaultTraefikConfig(); createDefaultServerTraefikConfig(); - await initializePostgres(); - await initializeTraefik(); - await initializeRedis(); + // await initializePostgres(); + // await initializeTraefik(); + // await initializeRedis(); initCronJobs(); // Timeout to wait for the database to be ready - await new Promise((resolve) => setTimeout(resolve, 7000)); + // await new Promise((resolve) => setTimeout(resolve, 7000)); await migration(); await sendDokployRestartNotifications(); } From 568c3a1d0673ef96ab3c196838a2a8ad5df01640 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 23 Mar 2025 23:38:55 -0600 Subject: [PATCH 2/3] chore(workflow): update branches for Dokploy Docker build to use custom hostname --- .github/workflows/dokploy.yml | 2 +- apps/dokploy/server/server.ts | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/dokploy.yml b/.github/workflows/dokploy.yml index adcb1bb54..0f65a50c9 100644 --- a/.github/workflows/dokploy.yml +++ b/.github/workflows/dokploy.yml @@ -2,7 +2,7 @@ name: Dokploy Docker Build on: push: - branches: [main, canary, "feat/better-auth-2"] + branches: [main, canary, "1061-custom-docker-service-hostname"] env: IMAGE_NAME: dokploy/dokploy diff --git a/apps/dokploy/server/server.ts b/apps/dokploy/server/server.ts index 4f5f0dc8b..921724cad 100644 --- a/apps/dokploy/server/server.ts +++ b/apps/dokploy/server/server.ts @@ -7,9 +7,6 @@ import { createDefaultTraefikConfig, initCronJobs, initializeNetwork, - initializePostgres, - initializeRedis, - initializeTraefik, sendDokployRestartNotifications, setupDirectories, } from "@dokploy/server"; @@ -49,14 +46,7 @@ void app.prepare().then(async () => { await initializeNetwork(); createDefaultTraefikConfig(); createDefaultServerTraefikConfig(); - // await initializePostgres(); - // await initializeTraefik(); - // await initializeRedis(); - initCronJobs(); - - // Timeout to wait for the database to be ready - // await new Promise((resolve) => setTimeout(resolve, 7000)); await migration(); await sendDokployRestartNotifications(); } From d29ff881fc2d5c8caf24cfe24a0e969f38f44f51 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 23 Mar 2025 23:43:38 -0600 Subject: [PATCH 3/3] fix(redis-connection): update Redis host configuration to use environment variable for production --- apps/dokploy/server/queues/redis-connection.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/dokploy/server/queues/redis-connection.ts b/apps/dokploy/server/queues/redis-connection.ts index 104e5f4e8..520ce4618 100644 --- a/apps/dokploy/server/queues/redis-connection.ts +++ b/apps/dokploy/server/queues/redis-connection.ts @@ -1,5 +1,8 @@ import type { ConnectionOptions } from "bullmq"; export const redisConfig: ConnectionOptions = { - host: process.env.NODE_ENV === "production" ? "dokploy-redis" : "127.0.0.1", + host: + process.env.NODE_ENV === "production" + ? process.env.REDIS_HOST || "dokploy-redis" + : "127.0.0.1", };