feat: add redis installation on server and deploy applications on servers

This commit is contained in:
Mauricio Siu
2024-09-08 22:10:24 -06:00
parent 1a34ba175e
commit 3d60236b36
39 changed files with 8616 additions and 155 deletions
@@ -41,8 +41,6 @@ export const SetupServer = ({ serverId }: Props) => {
},
);
const { mutateAsync } = api.server.setup.useMutation();
const [activeLog, setActiveLog] = useState<string | null>(null);
const { data: deployments, refetch } = api.deployment.allByServer.useQuery(
{ serverId },
@@ -52,6 +50,14 @@ export const SetupServer = ({ serverId }: Props) => {
},
);
const { mutateAsync } = api.server.setup.useMutation({
// onMutate: async (variables) => {
// console.log("Running....");
// utils.deployment.allByServer.invalidate({ serverId: variables.serverId });
// // refetch();
// },
});
return (
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>
@@ -94,7 +100,7 @@ export const SetupServer = ({ serverId }: Props) => {
serverId: server?.serverId || "",
})
.then(async () => {
refetch();
// refetch();
toast.success("Server setup successfully");
})
.catch(() => {