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

View File

@@ -11,8 +11,9 @@ interface Props {
logPath: string | null;
open: boolean;
onClose: () => void;
serverId: string;
}
export const ShowDeployment = ({ logPath, open, onClose }: Props) => {
export const ShowDeployment = ({ logPath, open, onClose, serverId }: Props) => {
const [data, setData] = useState("");
const endOfLogsRef = useRef<HTMLDivElement>(null);
@@ -21,7 +22,7 @@ export const ShowDeployment = ({ logPath, open, onClose }: Props) => {
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
const wsUrl = `${protocol}//${window.location.host}/listen-deployment?logPath=${logPath}`;
const wsUrl = `${protocol}//${window.location.host}/listen-deployment?logPath=${logPath}&serverId=${serverId}`;
const ws = new WebSocket(wsUrl);
ws.onmessage = (e) => {

View File

@@ -25,7 +25,7 @@ export const ShowDeployments = ({ applicationId }: Props) => {
{ applicationId },
{
enabled: !!applicationId,
refetchInterval: 5000,
refetchInterval: 1000,
},
);
const [url, setUrl] = React.useState("");
@@ -110,6 +110,7 @@ export const ShowDeployments = ({ applicationId }: Props) => {
</div>
)}
<ShowDeployment
serverId={data?.serverId || ""}
open={activeLog !== null}
onClose={() => setActiveLog(null)}
logPath={activeLog}