fix: run cli core probes via frontend container
This commit is contained in:
+4
-2
@@ -662,7 +662,7 @@ function brokerSource(): string {
|
||||
return String.raw`
|
||||
const open = JSON.parse(process.argv[2] || process.argv[1] || "{}");
|
||||
const token = process.env.PROVIDER_TOKEN || "";
|
||||
const url = "ws://127.0.0.1:8080/ws/ssh?token=" + encodeURIComponent(token);
|
||||
const url = "ws://backend-core:8080/ws/ssh?token=" + encodeURIComponent(token);
|
||||
const ws = new WebSocket(url);
|
||||
let exitCode = 255;
|
||||
let canSend = false;
|
||||
@@ -805,7 +805,9 @@ export async function runSsh(config: UniDeskConfig, providerId: string, args: st
|
||||
const child = spawn("docker", [
|
||||
"exec",
|
||||
"-i",
|
||||
"unidesk-backend-core",
|
||||
"-e",
|
||||
`PROVIDER_TOKEN=${config.providerGateway.token}`,
|
||||
"unidesk-frontend",
|
||||
"bun",
|
||||
"-e",
|
||||
brokerSource(),
|
||||
|
||||
Reference in New Issue
Block a user