Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export const ShowDokployActions = () => {
const { mutateAsync: reloadServer, isPending } =
api.settings.reloadServer.useMutation();

const { mutateAsync: cleanRedis } = api.settings.cleanRedis.useMutation();
const { mutateAsync: reloadRedis } = api.settings.reloadRedis.useMutation();
const { mutateAsync: cleanAllDeploymentQueue } =
api.settings.cleanAllDeploymentQueue.useMutation();

Expand Down Expand Up @@ -70,21 +68,6 @@ export const ShowDokployActions = () => {
</DropdownMenuItem>
</UpdateServerIp>

<DropdownMenuItem
className="cursor-pointer"
onClick={async () => {
await cleanRedis()
.then(async () => {
toast.success("Redis cleaned");
})
.catch(() => {
toast.error("Error cleaning Redis");
});
}}
>
Clean Redis
</DropdownMenuItem>

<DropdownMenuItem
className="cursor-pointer"
onClick={async () => {
Expand All @@ -99,21 +82,6 @@ export const ShowDokployActions = () => {
>
Clean all deployment queue
</DropdownMenuItem>

<DropdownMenuItem
className="cursor-pointer"
onClick={async () => {
await reloadRedis()
.then(async () => {
toast.success("Redis reloaded");
})
.catch(() => {
toast.error("Error reloading Redis");
});
}}
>
Reload Redis
</DropdownMenuItem>
</DropdownMenuGroup>
</DropdownMenuContent>
</DropdownMenu>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ type ServiceStatus = {

type HealthResult = {
postgres: ServiceStatus;
redis: ServiceStatus;
traefik: ServiceStatus;
};

Expand Down Expand Up @@ -89,7 +88,6 @@ export const UpdateWebServer = ({
const allHealthy =
healthResult &&
healthResult.postgres.status === "healthy" &&
healthResult.redis.status === "healthy" &&
healthResult.traefik.status === "healthy";

const checkIsUpdateFinished = async () => {
Expand Down Expand Up @@ -179,7 +177,7 @@ export const UpdateWebServer = ({
{modalState === "checking" && (
<span className="flex items-center gap-2">
<Loader2 className="animate-spin h-4 w-4" />
Checking PostgreSQL, Redis and Traefik...
Checking PostgreSQL and Traefik...
</span>
)}

Expand All @@ -190,10 +188,6 @@ export const UpdateWebServer = ({
name="PostgreSQL"
service={healthResult.postgres}
/>
<ServiceStatusItem
name="Redis"
service={healthResult.redis}
/>
<ServiceStatusItem
name="Traefik"
service={healthResult.traefik}
Expand Down
1 change: 0 additions & 1 deletion apps/dokploy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"better-auth": "1.6.23",
"bl": "6.0.11",
"boxen": "^7.1.1",
"bullmq": "5.67.3",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^0.2.1",
Expand Down
43 changes: 2 additions & 41 deletions apps/dokploy/server/api/routers/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
checkGPUStatus,
checkPortInUse,
checkPostgresHealth,
checkRedisHealth,
checkTraefikHealth,
cleanupAll,
cleanupAllBackground,
Expand All @@ -13,7 +12,6 @@ import {
cleanupSystem,
cleanupVolumes,
DEFAULT_UPDATE_DATA,
execAsync,
findServerById,
getDockerDiskUsage,
getDokployImageTag,
Expand Down Expand Up @@ -103,41 +101,6 @@ export const settingsRouter = createTRPCRouter({
});
return true;
}),
cleanRedis: adminProcedure.mutation(async ({ ctx }) => {
if (IS_CLOUD) {
return true;
}

const { stdout: containerId } = await execAsync(
`docker ps --filter "name=dokploy-redis" --filter "status=running" -q | head -n 1`,
);

if (!containerId) {
throw new Error("Redis container not found");
}

const redisContainerId = containerId.trim();

await execAsync(`docker exec -i ${redisContainerId} redis-cli flushall`);
await audit(ctx, {
action: "update",
resourceType: "settings",
resourceName: "clean-redis",
});
return true;
}),
reloadRedis: adminProcedure.mutation(async ({ ctx }) => {
if (IS_CLOUD) {
return true;
}
await reloadDockerResource("dokploy-redis");
await audit(ctx, {
action: "reload",
resourceType: "settings",
resourceName: "dokploy-redis",
});
return true;
}),
cleanAllDeploymentQueue: adminProcedure.mutation(async ({ ctx }) => {
if (IS_CLOUD) {
return true;
Expand Down Expand Up @@ -959,18 +922,16 @@ export const settingsRouter = createTRPCRouter({
if (IS_CLOUD) {
return {
postgres: { status: "healthy" as const },
redis: { status: "healthy" as const },
traefik: { status: "healthy" as const },
};
}

const [postgres, redis, traefik] = await Promise.all([
const [postgres, traefik] = await Promise.all([
checkPostgresHealth(),
checkRedisHealth(),
checkTraefikHealth(),
]);

return { postgres, redis, traefik };
return { postgres, traefik };
}),
setupGPU: adminProcedure
.input(
Expand Down
8 changes: 0 additions & 8 deletions apps/dokploy/server/queues/redis-connection.ts

This file was deleted.

2 changes: 0 additions & 2 deletions apps/dokploy/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ 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";
import {
initializeNetwork,
initializeSwarm,
Expand All @@ -29,7 +28,6 @@ import {
createDefaultServerTraefikConfig();
await execAsync(`docker pull traefik:v${TRAEFIK_VERSION}`);
await initializeStandaloneTraefik();
await initializeRedis();
await initializePostgres();
console.log("Dokploy setup completed");
exit(0);
Expand Down
1 change: 0 additions & 1 deletion packages/server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export * from "./setup/config-paths";
export * from "./setup/forward-auth-setup";
export * from "./setup/monitoring-setup";
export * from "./setup/postgres-setup";
export * from "./setup/redis-setup";
export * from "./setup/server-audit";
export * from "./setup/server-setup";
export * from "./setup/server-validate";
Expand Down
66 changes: 0 additions & 66 deletions packages/server/src/setup/redis-setup.ts

This file was deleted.

44 changes: 0 additions & 44 deletions packages/server/src/utils/docker/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -892,50 +892,6 @@ export const checkPostgresHealth = async (): Promise<ServiceHealthStatus> => {
}
};

export const checkRedisHealth = async (): Promise<ServiceHealthStatus> => {
const serviceCheck = await checkSwarmServiceRunning("dokploy-redis");
if (serviceCheck.status === "unhealthy") {
return serviceCheck;
}

// Verify Redis actually responds to PING
const containerId = await getSwarmServiceContainerId("dokploy-redis");
if (!containerId) {
return { status: "unhealthy", message: "Could not find running container" };
}

try {
const exec = await docker.getContainer(containerId).exec({
Cmd: ["redis-cli", "ping"],
AttachStdout: true,
AttachStderr: true,
});
const stream = await exec.start({});

const output = await new Promise<string>((resolve) => {
let data = "";
stream.on("data", (chunk: Buffer) => {
data += chunk.toString();
});
stream.on("end", () => resolve(data));
});

if (!output.includes("PONG")) {
return {
status: "unhealthy",
message: `Redis did not respond with PONG: ${output.trim()}`,
};
}

return { status: "healthy" };
} catch (error) {
return {
status: "unhealthy",
message: error instanceof Error ? error.message : "Failed to check Redis",
};
}
};

export const checkTraefikHealth = async (): Promise<ServiceHealthStatus> => {
// Traefik can run as a standalone container or a swarm service
try {
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading