mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-07 04:22:16 +00:00
Dokploy stopped using Redis in v0.29.9 when the deployment queue moved to an in-memory implementation, and install.sh no longer creates the dokploy-redis service. Remove the remaining references so fresh installs don't report Redis as unhealthy: - checkRedisHealth from infrastructure health check - cleanRedis/reloadRedis endpoints and their UI actions - initializeRedis dev setup and redis-connection config - unused bullmq dependency
90 lines
2.4 KiB
TypeScript
90 lines
2.4 KiB
TypeScript
import { toast } from "sonner";
|
|
import { UpdateServerIp } from "@/components/dashboard/settings/web-server/update-server-ip";
|
|
import { Button } from "@/components/ui/button";
|
|
import {
|
|
DropdownMenu,
|
|
DropdownMenuContent,
|
|
DropdownMenuGroup,
|
|
DropdownMenuItem,
|
|
DropdownMenuLabel,
|
|
DropdownMenuSeparator,
|
|
DropdownMenuTrigger,
|
|
} from "@/components/ui/dropdown-menu";
|
|
import { api } from "@/utils/api";
|
|
import { ShowModalLogs } from "../../web-server/show-modal-logs";
|
|
import { TerminalModal } from "../../web-server/terminal-modal";
|
|
import { GPUSupportModal } from "../gpu-support-modal";
|
|
|
|
export const ShowDokployActions = () => {
|
|
const { mutateAsync: reloadServer, isPending } =
|
|
api.settings.reloadServer.useMutation();
|
|
|
|
const { mutateAsync: cleanAllDeploymentQueue } =
|
|
api.settings.cleanAllDeploymentQueue.useMutation();
|
|
|
|
return (
|
|
<DropdownMenu>
|
|
<DropdownMenuTrigger asChild disabled={isPending}>
|
|
<Button isLoading={isPending} variant="outline">
|
|
Server
|
|
</Button>
|
|
</DropdownMenuTrigger>
|
|
<DropdownMenuContent className="w-56" align="start">
|
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
|
<DropdownMenuSeparator />
|
|
<DropdownMenuGroup>
|
|
<DropdownMenuItem
|
|
onClick={async () => {
|
|
await reloadServer()
|
|
.then(async () => {
|
|
toast.success("Server Reloaded");
|
|
})
|
|
.catch(() => {
|
|
toast.success("Server Reloaded");
|
|
});
|
|
}}
|
|
className="cursor-pointer"
|
|
>
|
|
<span>Reload</span>
|
|
</DropdownMenuItem>
|
|
<TerminalModal serverId="local">
|
|
<span>Terminal</span>
|
|
</TerminalModal>
|
|
<ShowModalLogs appName="dokploy">
|
|
<DropdownMenuItem
|
|
className="cursor-pointer"
|
|
onSelect={(e) => e.preventDefault()}
|
|
>
|
|
View Logs
|
|
</DropdownMenuItem>
|
|
</ShowModalLogs>
|
|
<GPUSupportModal />
|
|
<UpdateServerIp>
|
|
<DropdownMenuItem
|
|
className="cursor-pointer"
|
|
onSelect={(e) => e.preventDefault()}
|
|
>
|
|
Update Server IP
|
|
</DropdownMenuItem>
|
|
</UpdateServerIp>
|
|
|
|
<DropdownMenuItem
|
|
className="cursor-pointer"
|
|
onClick={async () => {
|
|
await cleanAllDeploymentQueue()
|
|
.then(() => {
|
|
toast.success("Deployment queue cleaned");
|
|
})
|
|
.catch(() => {
|
|
toast.error("Error cleaning deployment queue");
|
|
});
|
|
}}
|
|
>
|
|
Clean all deployment queue
|
|
</DropdownMenuItem>
|
|
</DropdownMenuGroup>
|
|
</DropdownMenuContent>
|
|
</DropdownMenu>
|
|
);
|
|
};
|