mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: stash
This commit is contained in:
@@ -12,7 +12,6 @@ import {
|
||||
} from "@/server/setup/traefik-setup";
|
||||
import { Client } from "ssh2";
|
||||
import { recreateDirectory } from "../utils/filesystem/directory";
|
||||
import { readSSHKey } from "../utils/filesystem/ssh";
|
||||
|
||||
import slug from "slugify";
|
||||
|
||||
@@ -70,13 +69,7 @@ const installRequirements = async (serverId: string, logPath: string) => {
|
||||
writeStream.close();
|
||||
throw new Error("No SSH Key found");
|
||||
}
|
||||
const keys = await readSSHKey(server.sshKeyId);
|
||||
|
||||
if (!keys.privateKey) {
|
||||
writeStream.write("❌ No SSH Key found");
|
||||
writeStream.close();
|
||||
throw new Error("No SSH Key found");
|
||||
}
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
client
|
||||
.once("ready", () => {
|
||||
@@ -142,7 +135,7 @@ const installRequirements = async (serverId: string, logPath: string) => {
|
||||
host: server.ipAddress,
|
||||
port: server.port,
|
||||
username: server.username,
|
||||
privateKey: keys.privateKey,
|
||||
privateKey: server.sshKey?.privateKey,
|
||||
timeout: 99999,
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user